models

package
v0.0.0-...-97f09c1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 29 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.
	TypeAccessToken = "AccessToken"
	TypeEnv         = "Env"
	TypeEnvAlias    = "EnvAlias"
	TypeEnvBuild    = "EnvBuild"
	TypeTeam        = "Team"
	TypeTeamAPIKey  = "TeamAPIKey"
	TypeTier        = "Tier"
	TypeUser        = "User"
	TypeUsersTeams  = "UsersTeams"
)

Variables

View Source
var (
	// DefaultSchemaConfig represents the default schema names for all tables as defined in ent/schema.
	DefaultSchemaConfig = SchemaConfig{
		AccessToken: tableSchemas[1],
		Env:         tableSchemas[1],
		EnvAlias:    tableSchemas[1],
		EnvBuild:    tableSchemas[1],
		Team:        tableSchemas[1],
		TeamAPIKey:  tableSchemas[1],
		Tier:        tableSchemas[1],
		User:        tableSchemas[0],
		UsersTeams:  tableSchemas[1],
	}
)
View Source
var ErrTxStarted = errors.New("models: 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 AccessToken

type AccessToken struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AccessTokenQuery when eager-loading is set.
	Edges AccessTokenEdges `json:"edges"`
	// contains filtered or unexported fields
}

AccessToken is the model entity for the AccessToken schema.

func (*AccessToken) QueryUser

func (at *AccessToken) QueryUser() *UserQuery

QueryUser queries the "user" edge of the AccessToken entity.

func (*AccessToken) String

func (at *AccessToken) String() string

String implements the fmt.Stringer.

func (*AccessToken) Unwrap

func (at *AccessToken) Unwrap() *AccessToken

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

func (at *AccessToken) Update() *AccessTokenUpdateOne

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

func (*AccessToken) Value

func (at *AccessToken) Value(name string) (ent.Value, error)

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

type AccessTokenClient

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

AccessTokenClient is a client for the AccessToken schema.

func NewAccessTokenClient

func NewAccessTokenClient(c config) *AccessTokenClient

NewAccessTokenClient returns a client for the AccessToken from the given config.

func (*AccessTokenClient) Create

func (c *AccessTokenClient) Create() *AccessTokenCreate

Create returns a builder for creating a AccessToken entity.

func (*AccessTokenClient) CreateBulk

func (c *AccessTokenClient) CreateBulk(builders ...*AccessTokenCreate) *AccessTokenCreateBulk

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

func (*AccessTokenClient) Delete

func (c *AccessTokenClient) Delete() *AccessTokenDelete

Delete returns a delete builder for AccessToken.

func (*AccessTokenClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AccessTokenClient) DeleteOneID

func (c *AccessTokenClient) DeleteOneID(id string) *AccessTokenDeleteOne

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

func (*AccessTokenClient) Get

Get returns a AccessToken entity by its id.

func (*AccessTokenClient) GetX

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

func (*AccessTokenClient) Hooks

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

Hooks returns the client hooks.

func (*AccessTokenClient) Intercept

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

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

func (*AccessTokenClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AccessTokenClient) MapCreateBulk

func (c *AccessTokenClient) MapCreateBulk(slice any, setFunc func(*AccessTokenCreate, int)) *AccessTokenCreateBulk

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

func (c *AccessTokenClient) Query() *AccessTokenQuery

Query returns a query builder for AccessToken.

func (*AccessTokenClient) QueryUser

func (c *AccessTokenClient) QueryUser(at *AccessToken) *UserQuery

QueryUser queries the user edge of a AccessToken.

func (*AccessTokenClient) Update

func (c *AccessTokenClient) Update() *AccessTokenUpdate

Update returns an update builder for AccessToken.

func (*AccessTokenClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AccessTokenClient) UpdateOneID

func (c *AccessTokenClient) UpdateOneID(id string) *AccessTokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AccessTokenClient) Use

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

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

type AccessTokenCreate

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

AccessTokenCreate is the builder for creating a AccessToken entity.

func (*AccessTokenCreate) Exec

func (atc *AccessTokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccessTokenCreate) ExecX

func (atc *AccessTokenCreate) ExecX(ctx context.Context)

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

func (*AccessTokenCreate) Mutation

func (atc *AccessTokenCreate) Mutation() *AccessTokenMutation

Mutation returns the AccessTokenMutation object of the builder.

func (*AccessTokenCreate) OnConflict

func (atc *AccessTokenCreate) OnConflict(opts ...sql.ConflictOption) *AccessTokenUpsertOne

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

client.AccessToken.Create().
	SetUserID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AccessTokenUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*AccessTokenCreate) OnConflictColumns

func (atc *AccessTokenCreate) OnConflictColumns(columns ...string) *AccessTokenUpsertOne

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

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

func (*AccessTokenCreate) Save

func (atc *AccessTokenCreate) Save(ctx context.Context) (*AccessToken, error)

Save creates the AccessToken in the database.

func (*AccessTokenCreate) SaveX

func (atc *AccessTokenCreate) SaveX(ctx context.Context) *AccessToken

SaveX calls Save and panics if Save returns an error.

func (*AccessTokenCreate) SetCreatedAt

func (atc *AccessTokenCreate) SetCreatedAt(t time.Time) *AccessTokenCreate

SetCreatedAt sets the "created_at" field.

func (*AccessTokenCreate) SetID

SetID sets the "id" field.

func (*AccessTokenCreate) SetUser

func (atc *AccessTokenCreate) SetUser(u *User) *AccessTokenCreate

SetUser sets the "user" edge to the User entity.

func (*AccessTokenCreate) SetUserID

func (atc *AccessTokenCreate) SetUserID(u uuid.UUID) *AccessTokenCreate

SetUserID sets the "user_id" field.

type AccessTokenCreateBulk

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

AccessTokenCreateBulk is the builder for creating many AccessToken entities in bulk.

func (*AccessTokenCreateBulk) Exec

func (atcb *AccessTokenCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AccessTokenCreateBulk) ExecX

func (atcb *AccessTokenCreateBulk) ExecX(ctx context.Context)

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

func (*AccessTokenCreateBulk) OnConflict

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

client.AccessToken.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.AccessTokenUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*AccessTokenCreateBulk) OnConflictColumns

func (atcb *AccessTokenCreateBulk) OnConflictColumns(columns ...string) *AccessTokenUpsertBulk

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

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

func (*AccessTokenCreateBulk) Save

func (atcb *AccessTokenCreateBulk) Save(ctx context.Context) ([]*AccessToken, error)

Save creates the AccessToken entities in the database.

func (*AccessTokenCreateBulk) SaveX

func (atcb *AccessTokenCreateBulk) SaveX(ctx context.Context) []*AccessToken

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

type AccessTokenDelete

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

AccessTokenDelete is the builder for deleting a AccessToken entity.

func (*AccessTokenDelete) Exec

func (atd *AccessTokenDelete) Exec(ctx context.Context) (int, error)

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

func (*AccessTokenDelete) ExecX

func (atd *AccessTokenDelete) ExecX(ctx context.Context) int

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

func (*AccessTokenDelete) Where

Where appends a list predicates to the AccessTokenDelete builder.

type AccessTokenDeleteOne

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

AccessTokenDeleteOne is the builder for deleting a single AccessToken entity.

func (*AccessTokenDeleteOne) Exec

func (atdo *AccessTokenDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AccessTokenDeleteOne) ExecX

func (atdo *AccessTokenDeleteOne) ExecX(ctx context.Context)

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

func (*AccessTokenDeleteOne) Where

Where appends a list predicates to the AccessTokenDelete builder.

type AccessTokenEdges

type AccessTokenEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

AccessTokenEdges holds the relations/edges for other nodes in the graph.

func (AccessTokenEdges) UserOrErr

func (e AccessTokenEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type AccessTokenGroupBy

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

AccessTokenGroupBy is the group-by builder for AccessToken entities.

func (*AccessTokenGroupBy) Aggregate

func (atgb *AccessTokenGroupBy) Aggregate(fns ...AggregateFunc) *AccessTokenGroupBy

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

func (*AccessTokenGroupBy) Bool

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

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

func (*AccessTokenGroupBy) BoolX

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

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

func (*AccessTokenGroupBy) Bools

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

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

func (*AccessTokenGroupBy) BoolsX

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

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

func (*AccessTokenGroupBy) Float64

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

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

func (*AccessTokenGroupBy) Float64X

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

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

func (*AccessTokenGroupBy) Float64s

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

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

func (*AccessTokenGroupBy) Float64sX

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

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

func (*AccessTokenGroupBy) Int

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

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

func (*AccessTokenGroupBy) IntX

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

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

func (*AccessTokenGroupBy) Ints

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

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

func (*AccessTokenGroupBy) IntsX

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

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

func (*AccessTokenGroupBy) Scan

func (atgb *AccessTokenGroupBy) Scan(ctx context.Context, v any) error

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

func (*AccessTokenGroupBy) ScanX

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

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

func (*AccessTokenGroupBy) String

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

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

func (*AccessTokenGroupBy) StringX

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

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

func (*AccessTokenGroupBy) Strings

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

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

func (*AccessTokenGroupBy) StringsX

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

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

type AccessTokenMutation

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

AccessTokenMutation represents an operation that mutates the AccessToken nodes in the graph.

func (*AccessTokenMutation) AddField

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

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

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

func (*AccessTokenMutation) AddedField

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

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

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

func (*AccessTokenMutation) AddedIDs

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

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

func (*AccessTokenMutation) ClearEdge

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

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) ClearUser

func (m *AccessTokenMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*AccessTokenMutation) ClearedEdges

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

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

func (*AccessTokenMutation) ClearedFields

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

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

func (AccessTokenMutation) Client

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

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

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

func (*AccessTokenMutation) EdgeCleared

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

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

func (*AccessTokenMutation) Field

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

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

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

func (*AccessTokenMutation) Fields

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

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

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) OldCreatedAt

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

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

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) OldUserID

func (m *AccessTokenMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the AccessToken entity. If the AccessToken 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 (*AccessTokenMutation) Op

func (m *AccessTokenMutation) Op() Op

Op returns the operation name.

func (*AccessTokenMutation) RemovedEdges

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

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

func (*AccessTokenMutation) RemovedIDs

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

func (m *AccessTokenMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AccessTokenMutation) ResetEdge

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

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) ResetUser

func (m *AccessTokenMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*AccessTokenMutation) ResetUserID

func (m *AccessTokenMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*AccessTokenMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*AccessTokenMutation) SetField

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

func (m *AccessTokenMutation) SetID(id string)

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

func (*AccessTokenMutation) SetOp

func (m *AccessTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AccessTokenMutation) SetUserID

func (m *AccessTokenMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (AccessTokenMutation) Tx

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

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

func (*AccessTokenMutation) Type

func (m *AccessTokenMutation) Type() string

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

func (*AccessTokenMutation) UserCleared

func (m *AccessTokenMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*AccessTokenMutation) UserID

func (m *AccessTokenMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*AccessTokenMutation) UserIDs

func (m *AccessTokenMutation) UserIDs() (ids []uuid.UUID)

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

func (m *AccessTokenMutation) Where(ps ...predicate.AccessToken)

Where appends a list predicates to the AccessTokenMutation builder.

func (*AccessTokenMutation) WhereP

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

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

type AccessTokenQuery

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

AccessTokenQuery is the builder for querying AccessToken entities.

func (*AccessTokenQuery) Aggregate

func (atq *AccessTokenQuery) Aggregate(fns ...AggregateFunc) *AccessTokenSelect

Aggregate returns a AccessTokenSelect configured with the given aggregations.

func (*AccessTokenQuery) All

func (atq *AccessTokenQuery) All(ctx context.Context) ([]*AccessToken, error)

All executes the query and returns a list of AccessTokens.

func (*AccessTokenQuery) AllX

func (atq *AccessTokenQuery) AllX(ctx context.Context) []*AccessToken

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

func (*AccessTokenQuery) Clone

func (atq *AccessTokenQuery) Clone() *AccessTokenQuery

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

func (*AccessTokenQuery) Count

func (atq *AccessTokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AccessTokenQuery) CountX

func (atq *AccessTokenQuery) CountX(ctx context.Context) int

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

func (*AccessTokenQuery) Exist

func (atq *AccessTokenQuery) Exist(ctx context.Context) (bool, error)

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

func (*AccessTokenQuery) ExistX

func (atq *AccessTokenQuery) ExistX(ctx context.Context) bool

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

func (*AccessTokenQuery) First

func (atq *AccessTokenQuery) First(ctx context.Context) (*AccessToken, error)

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

func (*AccessTokenQuery) FirstID

func (atq *AccessTokenQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*AccessTokenQuery) FirstIDX

func (atq *AccessTokenQuery) FirstIDX(ctx context.Context) string

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

func (*AccessTokenQuery) FirstX

func (atq *AccessTokenQuery) FirstX(ctx context.Context) *AccessToken

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

func (*AccessTokenQuery) GroupBy

func (atq *AccessTokenQuery) GroupBy(field string, fields ...string) *AccessTokenGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	UserID uuid.UUID `json:"user_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AccessToken.Query().
	GroupBy(accesstoken.FieldUserID).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*AccessTokenQuery) IDs

func (atq *AccessTokenQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*AccessTokenQuery) IDsX

func (atq *AccessTokenQuery) IDsX(ctx context.Context) []string

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

func (*AccessTokenQuery) Limit

func (atq *AccessTokenQuery) Limit(limit int) *AccessTokenQuery

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

func (*AccessTokenQuery) Modify

func (atq *AccessTokenQuery) Modify(modifiers ...func(s *sql.Selector)) *AccessTokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*AccessTokenQuery) Offset

func (atq *AccessTokenQuery) Offset(offset int) *AccessTokenQuery

Offset to start from.

func (*AccessTokenQuery) Only

func (atq *AccessTokenQuery) Only(ctx context.Context) (*AccessToken, error)

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

func (*AccessTokenQuery) OnlyID

func (atq *AccessTokenQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*AccessTokenQuery) OnlyIDX

func (atq *AccessTokenQuery) OnlyIDX(ctx context.Context) string

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

func (*AccessTokenQuery) OnlyX

func (atq *AccessTokenQuery) OnlyX(ctx context.Context) *AccessToken

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

func (*AccessTokenQuery) Order

Order specifies how the records should be ordered.

func (*AccessTokenQuery) QueryUser

func (atq *AccessTokenQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*AccessTokenQuery) Select

func (atq *AccessTokenQuery) Select(fields ...string) *AccessTokenSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	UserID uuid.UUID `json:"user_id,omitempty"`
}

client.AccessToken.Query().
	Select(accesstoken.FieldUserID).
	Scan(ctx, &v)

func (*AccessTokenQuery) Unique

func (atq *AccessTokenQuery) Unique(unique bool) *AccessTokenQuery

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

Where adds a new predicate for the AccessTokenQuery builder.

func (*AccessTokenQuery) WithUser

func (atq *AccessTokenQuery) WithUser(opts ...func(*UserQuery)) *AccessTokenQuery

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 AccessTokenSelect

type AccessTokenSelect struct {
	*AccessTokenQuery
	// contains filtered or unexported fields
}

AccessTokenSelect is the builder for selecting fields of AccessToken entities.

func (*AccessTokenSelect) Aggregate

func (ats *AccessTokenSelect) Aggregate(fns ...AggregateFunc) *AccessTokenSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AccessTokenSelect) Bool

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

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

func (*AccessTokenSelect) BoolX

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

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

func (*AccessTokenSelect) Bools

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

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

func (*AccessTokenSelect) BoolsX

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

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

func (*AccessTokenSelect) Float64

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

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

func (*AccessTokenSelect) Float64X

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

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

func (*AccessTokenSelect) Float64s

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

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

func (*AccessTokenSelect) Float64sX

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

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

func (*AccessTokenSelect) Int

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

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

func (*AccessTokenSelect) IntX

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

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

func (*AccessTokenSelect) Ints

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

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

func (*AccessTokenSelect) IntsX

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

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

func (*AccessTokenSelect) Modify

func (ats *AccessTokenSelect) Modify(modifiers ...func(s *sql.Selector)) *AccessTokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*AccessTokenSelect) Scan

func (ats *AccessTokenSelect) Scan(ctx context.Context, v any) error

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

func (*AccessTokenSelect) ScanX

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

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

func (*AccessTokenSelect) String

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

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

func (*AccessTokenSelect) StringX

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

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

func (*AccessTokenSelect) Strings

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

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

func (*AccessTokenSelect) StringsX

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

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

type AccessTokenUpdate

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

AccessTokenUpdate is the builder for updating AccessToken entities.

func (*AccessTokenUpdate) ClearUser

func (atu *AccessTokenUpdate) ClearUser() *AccessTokenUpdate

ClearUser clears the "user" edge to the User entity.

func (*AccessTokenUpdate) Exec

func (atu *AccessTokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccessTokenUpdate) ExecX

func (atu *AccessTokenUpdate) ExecX(ctx context.Context)

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

func (*AccessTokenUpdate) Modify

func (atu *AccessTokenUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccessTokenUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*AccessTokenUpdate) Mutation

func (atu *AccessTokenUpdate) Mutation() *AccessTokenMutation

Mutation returns the AccessTokenMutation object of the builder.

func (*AccessTokenUpdate) Save

func (atu *AccessTokenUpdate) Save(ctx context.Context) (int, error)

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

func (*AccessTokenUpdate) SaveX

func (atu *AccessTokenUpdate) SaveX(ctx context.Context) int

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

func (*AccessTokenUpdate) SetNillableUserID

func (atu *AccessTokenUpdate) SetNillableUserID(u *uuid.UUID) *AccessTokenUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*AccessTokenUpdate) SetUser

func (atu *AccessTokenUpdate) SetUser(u *User) *AccessTokenUpdate

SetUser sets the "user" edge to the User entity.

func (*AccessTokenUpdate) SetUserID

func (atu *AccessTokenUpdate) SetUserID(u uuid.UUID) *AccessTokenUpdate

SetUserID sets the "user_id" field.

func (*AccessTokenUpdate) Where

Where appends a list predicates to the AccessTokenUpdate builder.

type AccessTokenUpdateOne

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

AccessTokenUpdateOne is the builder for updating a single AccessToken entity.

func (*AccessTokenUpdateOne) ClearUser

func (atuo *AccessTokenUpdateOne) ClearUser() *AccessTokenUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*AccessTokenUpdateOne) Exec

func (atuo *AccessTokenUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AccessTokenUpdateOne) ExecX

func (atuo *AccessTokenUpdateOne) ExecX(ctx context.Context)

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

func (*AccessTokenUpdateOne) Modify

func (atuo *AccessTokenUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccessTokenUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*AccessTokenUpdateOne) Mutation

func (atuo *AccessTokenUpdateOne) Mutation() *AccessTokenMutation

Mutation returns the AccessTokenMutation object of the builder.

func (*AccessTokenUpdateOne) Save

Save executes the query and returns the updated AccessToken entity.

func (*AccessTokenUpdateOne) SaveX

func (atuo *AccessTokenUpdateOne) SaveX(ctx context.Context) *AccessToken

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

func (*AccessTokenUpdateOne) Select

func (atuo *AccessTokenUpdateOne) Select(field string, fields ...string) *AccessTokenUpdateOne

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

func (*AccessTokenUpdateOne) SetNillableUserID

func (atuo *AccessTokenUpdateOne) SetNillableUserID(u *uuid.UUID) *AccessTokenUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*AccessTokenUpdateOne) SetUser

func (atuo *AccessTokenUpdateOne) SetUser(u *User) *AccessTokenUpdateOne

SetUser sets the "user" edge to the User entity.

func (*AccessTokenUpdateOne) SetUserID

func (atuo *AccessTokenUpdateOne) SetUserID(u uuid.UUID) *AccessTokenUpdateOne

SetUserID sets the "user_id" field.

func (*AccessTokenUpdateOne) Where

Where appends a list predicates to the AccessTokenUpdate builder.

type AccessTokenUpsert

type AccessTokenUpsert struct {
	*sql.UpdateSet
}

AccessTokenUpsert is the "OnConflict" setter.

func (*AccessTokenUpsert) SetUserID

func (u *AccessTokenUpsert) SetUserID(v uuid.UUID) *AccessTokenUpsert

SetUserID sets the "user_id" field.

func (*AccessTokenUpsert) UpdateUserID

func (u *AccessTokenUpsert) UpdateUserID() *AccessTokenUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type AccessTokenUpsertBulk

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

AccessTokenUpsertBulk is the builder for "upsert"-ing a bulk of AccessToken nodes.

func (*AccessTokenUpsertBulk) DoNothing

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

func (*AccessTokenUpsertBulk) Exec

Exec executes the query.

func (*AccessTokenUpsertBulk) ExecX

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

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

func (*AccessTokenUpsertBulk) Ignore

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

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

func (*AccessTokenUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*AccessTokenUpsertBulk) Update

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

func (*AccessTokenUpsertBulk) UpdateNewValues

func (u *AccessTokenUpsertBulk) UpdateNewValues() *AccessTokenUpsertBulk

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

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

func (*AccessTokenUpsertBulk) UpdateUserID

func (u *AccessTokenUpsertBulk) UpdateUserID() *AccessTokenUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type AccessTokenUpsertOne

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

AccessTokenUpsertOne is the builder for "upsert"-ing

one AccessToken node.

func (*AccessTokenUpsertOne) DoNothing

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

func (*AccessTokenUpsertOne) Exec

Exec executes the query.

func (*AccessTokenUpsertOne) ExecX

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

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

func (*AccessTokenUpsertOne) ID

func (u *AccessTokenUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*AccessTokenUpsertOne) IDX

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

func (*AccessTokenUpsertOne) Ignore

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

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

func (*AccessTokenUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*AccessTokenUpsertOne) Update

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

func (*AccessTokenUpsertOne) UpdateNewValues

func (u *AccessTokenUpsertOne) UpdateNewValues() *AccessTokenUpsertOne

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

func (*AccessTokenUpsertOne) UpdateUserID

func (u *AccessTokenUpsertOne) UpdateUserID() *AccessTokenUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type AccessTokens

type AccessTokens []*AccessToken

AccessTokens is a parsable slice of AccessToken.

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(models.As(models.Sum(field1), "sum_field1"), (models.As(models.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AccessToken is the client for interacting with the AccessToken builders.
	AccessToken *AccessTokenClient
	// Env is the client for interacting with the Env builders.
	Env *EnvClient
	// EnvAlias is the client for interacting with the EnvAlias builders.
	EnvAlias *EnvAliasClient
	// EnvBuild is the client for interacting with the EnvBuild builders.
	EnvBuild *EnvBuildClient
	// Team is the client for interacting with the Team builders.
	Team *TeamClient
	// TeamAPIKey is the client for interacting with the TeamAPIKey builders.
	TeamAPIKey *TeamAPIKeyClient
	// Tier is the client for interacting with the Tier builders.
	Tier *TierClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UsersTeams is the client for interacting with the UsersTeams builders.
	UsersTeams *UsersTeamsClient
	// 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().
	AccessToken.
	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 Env

type Env struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// TeamID holds the value of the "team_id" field.
	TeamID uuid.UUID `json:"team_id,omitempty"`
	// Public holds the value of the "public" field.
	Public bool `json:"public,omitempty"`
	// BuildCount holds the value of the "build_count" field.
	BuildCount int32 `json:"build_count,omitempty"`
	// Number of times the env was spawned
	SpawnCount int64 `json:"spawn_count,omitempty"`
	// Timestamp of the last time the env was spawned
	LastSpawnedAt time.Time `json:"last_spawned_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EnvQuery when eager-loading is set.
	Edges EnvEdges `json:"edges"`
	// contains filtered or unexported fields
}

Env is the model entity for the Env schema.

func (*Env) QueryBuilds

func (e *Env) QueryBuilds() *EnvBuildQuery

QueryBuilds queries the "builds" edge of the Env entity.

func (*Env) QueryEnvAliases

func (e *Env) QueryEnvAliases() *EnvAliasQuery

QueryEnvAliases queries the "env_aliases" edge of the Env entity.

func (*Env) QueryTeam

func (e *Env) QueryTeam() *TeamQuery

QueryTeam queries the "team" edge of the Env entity.

func (*Env) String

func (e *Env) String() string

String implements the fmt.Stringer.

func (*Env) Unwrap

func (e *Env) Unwrap() *Env

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

func (e *Env) Update() *EnvUpdateOne

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

func (*Env) Value

func (e *Env) Value(name string) (ent.Value, error)

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

type EnvAlias

type EnvAlias struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// EnvID holds the value of the "env_id" field.
	EnvID string `json:"env_id,omitempty"`
	// IsRenamable holds the value of the "is_renamable" field.
	IsRenamable bool `json:"is_renamable,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EnvAliasQuery when eager-loading is set.
	Edges EnvAliasEdges `json:"edges"`
	// contains filtered or unexported fields
}

EnvAlias is the model entity for the EnvAlias schema.

func (*EnvAlias) QueryEnv

func (ea *EnvAlias) QueryEnv() *EnvQuery

QueryEnv queries the "env" edge of the EnvAlias entity.

func (*EnvAlias) String

func (ea *EnvAlias) String() string

String implements the fmt.Stringer.

func (*EnvAlias) Unwrap

func (ea *EnvAlias) Unwrap() *EnvAlias

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

func (ea *EnvAlias) Update() *EnvAliasUpdateOne

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

func (*EnvAlias) Value

func (ea *EnvAlias) Value(name string) (ent.Value, error)

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

type EnvAliasClient

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

EnvAliasClient is a client for the EnvAlias schema.

func NewEnvAliasClient

func NewEnvAliasClient(c config) *EnvAliasClient

NewEnvAliasClient returns a client for the EnvAlias from the given config.

func (*EnvAliasClient) Create

func (c *EnvAliasClient) Create() *EnvAliasCreate

Create returns a builder for creating a EnvAlias entity.

func (*EnvAliasClient) CreateBulk

func (c *EnvAliasClient) CreateBulk(builders ...*EnvAliasCreate) *EnvAliasCreateBulk

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

func (*EnvAliasClient) Delete

func (c *EnvAliasClient) Delete() *EnvAliasDelete

Delete returns a delete builder for EnvAlias.

func (*EnvAliasClient) DeleteOne

func (c *EnvAliasClient) DeleteOne(ea *EnvAlias) *EnvAliasDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EnvAliasClient) DeleteOneID

func (c *EnvAliasClient) DeleteOneID(id string) *EnvAliasDeleteOne

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

func (*EnvAliasClient) Get

func (c *EnvAliasClient) Get(ctx context.Context, id string) (*EnvAlias, error)

Get returns a EnvAlias entity by its id.

func (*EnvAliasClient) GetX

func (c *EnvAliasClient) GetX(ctx context.Context, id string) *EnvAlias

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

func (*EnvAliasClient) Hooks

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

Hooks returns the client hooks.

func (*EnvAliasClient) Intercept

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

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

func (*EnvAliasClient) Interceptors

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

Interceptors returns the client interceptors.

func (*EnvAliasClient) MapCreateBulk

func (c *EnvAliasClient) MapCreateBulk(slice any, setFunc func(*EnvAliasCreate, int)) *EnvAliasCreateBulk

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

func (c *EnvAliasClient) Query() *EnvAliasQuery

Query returns a query builder for EnvAlias.

func (*EnvAliasClient) QueryEnv

func (c *EnvAliasClient) QueryEnv(ea *EnvAlias) *EnvQuery

QueryEnv queries the env edge of a EnvAlias.

func (*EnvAliasClient) Update

func (c *EnvAliasClient) Update() *EnvAliasUpdate

Update returns an update builder for EnvAlias.

func (*EnvAliasClient) UpdateOne

func (c *EnvAliasClient) UpdateOne(ea *EnvAlias) *EnvAliasUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EnvAliasClient) UpdateOneID

func (c *EnvAliasClient) UpdateOneID(id string) *EnvAliasUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EnvAliasClient) Use

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

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

type EnvAliasCreate

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

EnvAliasCreate is the builder for creating a EnvAlias entity.

func (*EnvAliasCreate) Exec

func (eac *EnvAliasCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvAliasCreate) ExecX

func (eac *EnvAliasCreate) ExecX(ctx context.Context)

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

func (*EnvAliasCreate) Mutation

func (eac *EnvAliasCreate) Mutation() *EnvAliasMutation

Mutation returns the EnvAliasMutation object of the builder.

func (*EnvAliasCreate) OnConflict

func (eac *EnvAliasCreate) OnConflict(opts ...sql.ConflictOption) *EnvAliasUpsertOne

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

client.EnvAlias.Create().
	SetEnvID(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.EnvAliasUpsert) {
		SetEnvID(v+v).
	}).
	Exec(ctx)

func (*EnvAliasCreate) OnConflictColumns

func (eac *EnvAliasCreate) OnConflictColumns(columns ...string) *EnvAliasUpsertOne

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

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

func (*EnvAliasCreate) Save

func (eac *EnvAliasCreate) Save(ctx context.Context) (*EnvAlias, error)

Save creates the EnvAlias in the database.

func (*EnvAliasCreate) SaveX

func (eac *EnvAliasCreate) SaveX(ctx context.Context) *EnvAlias

SaveX calls Save and panics if Save returns an error.

func (*EnvAliasCreate) SetEnv

func (eac *EnvAliasCreate) SetEnv(e *Env) *EnvAliasCreate

SetEnv sets the "env" edge to the Env entity.

func (*EnvAliasCreate) SetEnvID

func (eac *EnvAliasCreate) SetEnvID(s string) *EnvAliasCreate

SetEnvID sets the "env_id" field.

func (*EnvAliasCreate) SetID

func (eac *EnvAliasCreate) SetID(s string) *EnvAliasCreate

SetID sets the "id" field.

func (*EnvAliasCreate) SetIsRenamable

func (eac *EnvAliasCreate) SetIsRenamable(b bool) *EnvAliasCreate

SetIsRenamable sets the "is_renamable" field.

func (*EnvAliasCreate) SetNillableIsRenamable

func (eac *EnvAliasCreate) SetNillableIsRenamable(b *bool) *EnvAliasCreate

SetNillableIsRenamable sets the "is_renamable" field if the given value is not nil.

type EnvAliasCreateBulk

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

EnvAliasCreateBulk is the builder for creating many EnvAlias entities in bulk.

func (*EnvAliasCreateBulk) Exec

func (eacb *EnvAliasCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvAliasCreateBulk) ExecX

func (eacb *EnvAliasCreateBulk) ExecX(ctx context.Context)

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

func (*EnvAliasCreateBulk) OnConflict

func (eacb *EnvAliasCreateBulk) OnConflict(opts ...sql.ConflictOption) *EnvAliasUpsertBulk

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

client.EnvAlias.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.EnvAliasUpsert) {
		SetEnvID(v+v).
	}).
	Exec(ctx)

func (*EnvAliasCreateBulk) OnConflictColumns

func (eacb *EnvAliasCreateBulk) OnConflictColumns(columns ...string) *EnvAliasUpsertBulk

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

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

func (*EnvAliasCreateBulk) Save

func (eacb *EnvAliasCreateBulk) Save(ctx context.Context) ([]*EnvAlias, error)

Save creates the EnvAlias entities in the database.

func (*EnvAliasCreateBulk) SaveX

func (eacb *EnvAliasCreateBulk) SaveX(ctx context.Context) []*EnvAlias

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

type EnvAliasDelete

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

EnvAliasDelete is the builder for deleting a EnvAlias entity.

func (*EnvAliasDelete) Exec

func (ead *EnvAliasDelete) Exec(ctx context.Context) (int, error)

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

func (*EnvAliasDelete) ExecX

func (ead *EnvAliasDelete) ExecX(ctx context.Context) int

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

func (*EnvAliasDelete) Where

func (ead *EnvAliasDelete) Where(ps ...predicate.EnvAlias) *EnvAliasDelete

Where appends a list predicates to the EnvAliasDelete builder.

type EnvAliasDeleteOne

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

EnvAliasDeleteOne is the builder for deleting a single EnvAlias entity.

func (*EnvAliasDeleteOne) Exec

func (eado *EnvAliasDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EnvAliasDeleteOne) ExecX

func (eado *EnvAliasDeleteOne) ExecX(ctx context.Context)

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

func (*EnvAliasDeleteOne) Where

Where appends a list predicates to the EnvAliasDelete builder.

type EnvAliasEdges

type EnvAliasEdges struct {
	// Env holds the value of the env edge.
	Env *Env `json:"env,omitempty"`
	// contains filtered or unexported fields
}

EnvAliasEdges holds the relations/edges for other nodes in the graph.

func (EnvAliasEdges) EnvOrErr

func (e EnvAliasEdges) EnvOrErr() (*Env, error)

EnvOrErr returns the Env value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EnvAliasGroupBy

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

EnvAliasGroupBy is the group-by builder for EnvAlias entities.

func (*EnvAliasGroupBy) Aggregate

func (eagb *EnvAliasGroupBy) Aggregate(fns ...AggregateFunc) *EnvAliasGroupBy

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

func (*EnvAliasGroupBy) Bool

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

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

func (*EnvAliasGroupBy) BoolX

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

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

func (*EnvAliasGroupBy) Bools

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

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

func (*EnvAliasGroupBy) BoolsX

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

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

func (*EnvAliasGroupBy) Float64

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

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

func (*EnvAliasGroupBy) Float64X

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

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

func (*EnvAliasGroupBy) Float64s

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

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

func (*EnvAliasGroupBy) Float64sX

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

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

func (*EnvAliasGroupBy) Int

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

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

func (*EnvAliasGroupBy) IntX

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

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

func (*EnvAliasGroupBy) Ints

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

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

func (*EnvAliasGroupBy) IntsX

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

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

func (*EnvAliasGroupBy) Scan

func (eagb *EnvAliasGroupBy) Scan(ctx context.Context, v any) error

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

func (*EnvAliasGroupBy) ScanX

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

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

func (*EnvAliasGroupBy) String

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

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

func (*EnvAliasGroupBy) StringX

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

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

func (*EnvAliasGroupBy) Strings

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

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

func (*EnvAliasGroupBy) StringsX

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

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

type EnvAliasMutation

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

EnvAliasMutation represents an operation that mutates the EnvAlias nodes in the graph.

func (*EnvAliasMutation) AddField

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

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

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

func (*EnvAliasMutation) AddedField

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

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

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

func (*EnvAliasMutation) AddedIDs

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

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

func (*EnvAliasMutation) ClearEdge

func (m *EnvAliasMutation) 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 (*EnvAliasMutation) ClearEnv

func (m *EnvAliasMutation) ClearEnv()

ClearEnv clears the "env" edge to the Env entity.

func (*EnvAliasMutation) ClearField

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

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

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

func (*EnvAliasMutation) ClearedFields

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

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

func (EnvAliasMutation) Client

func (m EnvAliasMutation) 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 (*EnvAliasMutation) EdgeCleared

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

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

func (*EnvAliasMutation) EnvCleared

func (m *EnvAliasMutation) EnvCleared() bool

EnvCleared reports if the "env" edge to the Env entity was cleared.

func (*EnvAliasMutation) EnvID

func (m *EnvAliasMutation) EnvID() (r string, exists bool)

EnvID returns the value of the "env_id" field in the mutation.

func (*EnvAliasMutation) EnvIDs

func (m *EnvAliasMutation) EnvIDs() (ids []string)

EnvIDs returns the "env" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EnvID instead. It exists only for internal usage by the builders.

func (*EnvAliasMutation) Field

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

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

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

func (*EnvAliasMutation) Fields

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

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

func (m *EnvAliasMutation) 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 (*EnvAliasMutation) IsRenamable

func (m *EnvAliasMutation) IsRenamable() (r bool, exists bool)

IsRenamable returns the value of the "is_renamable" field in the mutation.

func (*EnvAliasMutation) OldEnvID

func (m *EnvAliasMutation) OldEnvID(ctx context.Context) (v string, err error)

OldEnvID returns the old "env_id" field's value of the EnvAlias entity. If the EnvAlias 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 (*EnvAliasMutation) OldField

func (m *EnvAliasMutation) 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 (*EnvAliasMutation) OldIsRenamable

func (m *EnvAliasMutation) OldIsRenamable(ctx context.Context) (v bool, err error)

OldIsRenamable returns the old "is_renamable" field's value of the EnvAlias entity. If the EnvAlias 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 (*EnvAliasMutation) Op

func (m *EnvAliasMutation) Op() Op

Op returns the operation name.

func (*EnvAliasMutation) RemovedEdges

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

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

func (*EnvAliasMutation) RemovedIDs

func (m *EnvAliasMutation) 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 (*EnvAliasMutation) ResetEdge

func (m *EnvAliasMutation) 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 (*EnvAliasMutation) ResetEnv

func (m *EnvAliasMutation) ResetEnv()

ResetEnv resets all changes to the "env" edge.

func (*EnvAliasMutation) ResetEnvID

func (m *EnvAliasMutation) ResetEnvID()

ResetEnvID resets all changes to the "env_id" field.

func (*EnvAliasMutation) ResetField

func (m *EnvAliasMutation) 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 (*EnvAliasMutation) ResetIsRenamable

func (m *EnvAliasMutation) ResetIsRenamable()

ResetIsRenamable resets all changes to the "is_renamable" field.

func (*EnvAliasMutation) SetEnvID

func (m *EnvAliasMutation) SetEnvID(s string)

SetEnvID sets the "env_id" field.

func (*EnvAliasMutation) SetField

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

func (m *EnvAliasMutation) SetID(id string)

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

func (*EnvAliasMutation) SetIsRenamable

func (m *EnvAliasMutation) SetIsRenamable(b bool)

SetIsRenamable sets the "is_renamable" field.

func (*EnvAliasMutation) SetOp

func (m *EnvAliasMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (EnvAliasMutation) Tx

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

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

func (*EnvAliasMutation) Type

func (m *EnvAliasMutation) Type() string

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

func (*EnvAliasMutation) Where

func (m *EnvAliasMutation) Where(ps ...predicate.EnvAlias)

Where appends a list predicates to the EnvAliasMutation builder.

func (*EnvAliasMutation) WhereP

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

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

type EnvAliasQuery

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

EnvAliasQuery is the builder for querying EnvAlias entities.

func (*EnvAliasQuery) Aggregate

func (eaq *EnvAliasQuery) Aggregate(fns ...AggregateFunc) *EnvAliasSelect

Aggregate returns a EnvAliasSelect configured with the given aggregations.

func (*EnvAliasQuery) All

func (eaq *EnvAliasQuery) All(ctx context.Context) ([]*EnvAlias, error)

All executes the query and returns a list of EnvAliasSlice.

func (*EnvAliasQuery) AllX

func (eaq *EnvAliasQuery) AllX(ctx context.Context) []*EnvAlias

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

func (*EnvAliasQuery) Clone

func (eaq *EnvAliasQuery) Clone() *EnvAliasQuery

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

func (*EnvAliasQuery) Count

func (eaq *EnvAliasQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EnvAliasQuery) CountX

func (eaq *EnvAliasQuery) CountX(ctx context.Context) int

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

func (*EnvAliasQuery) Exist

func (eaq *EnvAliasQuery) Exist(ctx context.Context) (bool, error)

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

func (*EnvAliasQuery) ExistX

func (eaq *EnvAliasQuery) ExistX(ctx context.Context) bool

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

func (*EnvAliasQuery) First

func (eaq *EnvAliasQuery) First(ctx context.Context) (*EnvAlias, error)

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

func (*EnvAliasQuery) FirstID

func (eaq *EnvAliasQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*EnvAliasQuery) FirstIDX

func (eaq *EnvAliasQuery) FirstIDX(ctx context.Context) string

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

func (*EnvAliasQuery) FirstX

func (eaq *EnvAliasQuery) FirstX(ctx context.Context) *EnvAlias

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

func (*EnvAliasQuery) GroupBy

func (eaq *EnvAliasQuery) GroupBy(field string, fields ...string) *EnvAliasGroupBy

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

client.EnvAlias.Query().
	GroupBy(envalias.FieldEnvID).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*EnvAliasQuery) IDs

func (eaq *EnvAliasQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*EnvAliasQuery) IDsX

func (eaq *EnvAliasQuery) IDsX(ctx context.Context) []string

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

func (*EnvAliasQuery) Limit

func (eaq *EnvAliasQuery) Limit(limit int) *EnvAliasQuery

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

func (*EnvAliasQuery) Modify

func (eaq *EnvAliasQuery) Modify(modifiers ...func(s *sql.Selector)) *EnvAliasSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvAliasQuery) Offset

func (eaq *EnvAliasQuery) Offset(offset int) *EnvAliasQuery

Offset to start from.

func (*EnvAliasQuery) Only

func (eaq *EnvAliasQuery) Only(ctx context.Context) (*EnvAlias, error)

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

func (*EnvAliasQuery) OnlyID

func (eaq *EnvAliasQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*EnvAliasQuery) OnlyIDX

func (eaq *EnvAliasQuery) OnlyIDX(ctx context.Context) string

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

func (*EnvAliasQuery) OnlyX

func (eaq *EnvAliasQuery) OnlyX(ctx context.Context) *EnvAlias

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

func (*EnvAliasQuery) Order

func (eaq *EnvAliasQuery) Order(o ...envalias.OrderOption) *EnvAliasQuery

Order specifies how the records should be ordered.

func (*EnvAliasQuery) QueryEnv

func (eaq *EnvAliasQuery) QueryEnv() *EnvQuery

QueryEnv chains the current query on the "env" edge.

func (*EnvAliasQuery) Select

func (eaq *EnvAliasQuery) Select(fields ...string) *EnvAliasSelect

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

client.EnvAlias.Query().
	Select(envalias.FieldEnvID).
	Scan(ctx, &v)

func (*EnvAliasQuery) Unique

func (eaq *EnvAliasQuery) Unique(unique bool) *EnvAliasQuery

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

func (eaq *EnvAliasQuery) Where(ps ...predicate.EnvAlias) *EnvAliasQuery

Where adds a new predicate for the EnvAliasQuery builder.

func (*EnvAliasQuery) WithEnv

func (eaq *EnvAliasQuery) WithEnv(opts ...func(*EnvQuery)) *EnvAliasQuery

WithEnv tells the query-builder to eager-load the nodes that are connected to the "env" edge. The optional arguments are used to configure the query builder of the edge.

type EnvAliasSelect

type EnvAliasSelect struct {
	*EnvAliasQuery
	// contains filtered or unexported fields
}

EnvAliasSelect is the builder for selecting fields of EnvAlias entities.

func (*EnvAliasSelect) Aggregate

func (eas *EnvAliasSelect) Aggregate(fns ...AggregateFunc) *EnvAliasSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EnvAliasSelect) Bool

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

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

func (*EnvAliasSelect) BoolX

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

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

func (*EnvAliasSelect) Bools

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

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

func (*EnvAliasSelect) BoolsX

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

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

func (*EnvAliasSelect) Float64

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

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

func (*EnvAliasSelect) Float64X

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

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

func (*EnvAliasSelect) Float64s

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

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

func (*EnvAliasSelect) Float64sX

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

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

func (*EnvAliasSelect) Int

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

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

func (*EnvAliasSelect) IntX

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

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

func (*EnvAliasSelect) Ints

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

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

func (*EnvAliasSelect) IntsX

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

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

func (*EnvAliasSelect) Modify

func (eas *EnvAliasSelect) Modify(modifiers ...func(s *sql.Selector)) *EnvAliasSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvAliasSelect) Scan

func (eas *EnvAliasSelect) Scan(ctx context.Context, v any) error

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

func (*EnvAliasSelect) ScanX

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

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

func (*EnvAliasSelect) String

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

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

func (*EnvAliasSelect) StringX

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

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

func (*EnvAliasSelect) Strings

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

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

func (*EnvAliasSelect) StringsX

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

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

type EnvAliasSlice

type EnvAliasSlice []*EnvAlias

EnvAliasSlice is a parsable slice of EnvAlias.

type EnvAliasUpdate

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

EnvAliasUpdate is the builder for updating EnvAlias entities.

func (*EnvAliasUpdate) ClearEnv

func (eau *EnvAliasUpdate) ClearEnv() *EnvAliasUpdate

ClearEnv clears the "env" edge to the Env entity.

func (*EnvAliasUpdate) Exec

func (eau *EnvAliasUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvAliasUpdate) ExecX

func (eau *EnvAliasUpdate) ExecX(ctx context.Context)

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

func (*EnvAliasUpdate) Modify

func (eau *EnvAliasUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvAliasUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvAliasUpdate) Mutation

func (eau *EnvAliasUpdate) Mutation() *EnvAliasMutation

Mutation returns the EnvAliasMutation object of the builder.

func (*EnvAliasUpdate) Save

func (eau *EnvAliasUpdate) Save(ctx context.Context) (int, error)

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

func (*EnvAliasUpdate) SaveX

func (eau *EnvAliasUpdate) SaveX(ctx context.Context) int

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

func (*EnvAliasUpdate) SetEnv

func (eau *EnvAliasUpdate) SetEnv(e *Env) *EnvAliasUpdate

SetEnv sets the "env" edge to the Env entity.

func (*EnvAliasUpdate) SetEnvID

func (eau *EnvAliasUpdate) SetEnvID(s string) *EnvAliasUpdate

SetEnvID sets the "env_id" field.

func (*EnvAliasUpdate) SetIsRenamable

func (eau *EnvAliasUpdate) SetIsRenamable(b bool) *EnvAliasUpdate

SetIsRenamable sets the "is_renamable" field.

func (*EnvAliasUpdate) SetNillableEnvID

func (eau *EnvAliasUpdate) SetNillableEnvID(s *string) *EnvAliasUpdate

SetNillableEnvID sets the "env_id" field if the given value is not nil.

func (*EnvAliasUpdate) SetNillableIsRenamable

func (eau *EnvAliasUpdate) SetNillableIsRenamable(b *bool) *EnvAliasUpdate

SetNillableIsRenamable sets the "is_renamable" field if the given value is not nil.

func (*EnvAliasUpdate) Where

func (eau *EnvAliasUpdate) Where(ps ...predicate.EnvAlias) *EnvAliasUpdate

Where appends a list predicates to the EnvAliasUpdate builder.

type EnvAliasUpdateOne

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

EnvAliasUpdateOne is the builder for updating a single EnvAlias entity.

func (*EnvAliasUpdateOne) ClearEnv

func (eauo *EnvAliasUpdateOne) ClearEnv() *EnvAliasUpdateOne

ClearEnv clears the "env" edge to the Env entity.

func (*EnvAliasUpdateOne) Exec

func (eauo *EnvAliasUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EnvAliasUpdateOne) ExecX

func (eauo *EnvAliasUpdateOne) ExecX(ctx context.Context)

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

func (*EnvAliasUpdateOne) Modify

func (eauo *EnvAliasUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvAliasUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvAliasUpdateOne) Mutation

func (eauo *EnvAliasUpdateOne) Mutation() *EnvAliasMutation

Mutation returns the EnvAliasMutation object of the builder.

func (*EnvAliasUpdateOne) Save

func (eauo *EnvAliasUpdateOne) Save(ctx context.Context) (*EnvAlias, error)

Save executes the query and returns the updated EnvAlias entity.

func (*EnvAliasUpdateOne) SaveX

func (eauo *EnvAliasUpdateOne) SaveX(ctx context.Context) *EnvAlias

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

func (*EnvAliasUpdateOne) Select

func (eauo *EnvAliasUpdateOne) Select(field string, fields ...string) *EnvAliasUpdateOne

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

func (*EnvAliasUpdateOne) SetEnv

func (eauo *EnvAliasUpdateOne) SetEnv(e *Env) *EnvAliasUpdateOne

SetEnv sets the "env" edge to the Env entity.

func (*EnvAliasUpdateOne) SetEnvID

func (eauo *EnvAliasUpdateOne) SetEnvID(s string) *EnvAliasUpdateOne

SetEnvID sets the "env_id" field.

func (*EnvAliasUpdateOne) SetIsRenamable

func (eauo *EnvAliasUpdateOne) SetIsRenamable(b bool) *EnvAliasUpdateOne

SetIsRenamable sets the "is_renamable" field.

func (*EnvAliasUpdateOne) SetNillableEnvID

func (eauo *EnvAliasUpdateOne) SetNillableEnvID(s *string) *EnvAliasUpdateOne

SetNillableEnvID sets the "env_id" field if the given value is not nil.

func (*EnvAliasUpdateOne) SetNillableIsRenamable

func (eauo *EnvAliasUpdateOne) SetNillableIsRenamable(b *bool) *EnvAliasUpdateOne

SetNillableIsRenamable sets the "is_renamable" field if the given value is not nil.

func (*EnvAliasUpdateOne) Where

Where appends a list predicates to the EnvAliasUpdate builder.

type EnvAliasUpsert

type EnvAliasUpsert struct {
	*sql.UpdateSet
}

EnvAliasUpsert is the "OnConflict" setter.

func (*EnvAliasUpsert) SetEnvID

func (u *EnvAliasUpsert) SetEnvID(v string) *EnvAliasUpsert

SetEnvID sets the "env_id" field.

func (*EnvAliasUpsert) SetIsRenamable

func (u *EnvAliasUpsert) SetIsRenamable(v bool) *EnvAliasUpsert

SetIsRenamable sets the "is_renamable" field.

func (*EnvAliasUpsert) UpdateEnvID

func (u *EnvAliasUpsert) UpdateEnvID() *EnvAliasUpsert

UpdateEnvID sets the "env_id" field to the value that was provided on create.

func (*EnvAliasUpsert) UpdateIsRenamable

func (u *EnvAliasUpsert) UpdateIsRenamable() *EnvAliasUpsert

UpdateIsRenamable sets the "is_renamable" field to the value that was provided on create.

type EnvAliasUpsertBulk

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

EnvAliasUpsertBulk is the builder for "upsert"-ing a bulk of EnvAlias nodes.

func (*EnvAliasUpsertBulk) DoNothing

func (u *EnvAliasUpsertBulk) DoNothing() *EnvAliasUpsertBulk

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

func (*EnvAliasUpsertBulk) Exec

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

Exec executes the query.

func (*EnvAliasUpsertBulk) ExecX

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

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

func (*EnvAliasUpsertBulk) Ignore

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

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

func (*EnvAliasUpsertBulk) SetEnvID

SetEnvID sets the "env_id" field.

func (*EnvAliasUpsertBulk) SetIsRenamable

func (u *EnvAliasUpsertBulk) SetIsRenamable(v bool) *EnvAliasUpsertBulk

SetIsRenamable sets the "is_renamable" field.

func (*EnvAliasUpsertBulk) Update

func (u *EnvAliasUpsertBulk) Update(set func(*EnvAliasUpsert)) *EnvAliasUpsertBulk

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

func (*EnvAliasUpsertBulk) UpdateEnvID

func (u *EnvAliasUpsertBulk) UpdateEnvID() *EnvAliasUpsertBulk

UpdateEnvID sets the "env_id" field to the value that was provided on create.

func (*EnvAliasUpsertBulk) UpdateIsRenamable

func (u *EnvAliasUpsertBulk) UpdateIsRenamable() *EnvAliasUpsertBulk

UpdateIsRenamable sets the "is_renamable" field to the value that was provided on create.

func (*EnvAliasUpsertBulk) UpdateNewValues

func (u *EnvAliasUpsertBulk) UpdateNewValues() *EnvAliasUpsertBulk

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

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

type EnvAliasUpsertOne

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

EnvAliasUpsertOne is the builder for "upsert"-ing

one EnvAlias node.

func (*EnvAliasUpsertOne) DoNothing

func (u *EnvAliasUpsertOne) DoNothing() *EnvAliasUpsertOne

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

func (*EnvAliasUpsertOne) Exec

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

Exec executes the query.

func (*EnvAliasUpsertOne) ExecX

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

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

func (*EnvAliasUpsertOne) ID

func (u *EnvAliasUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*EnvAliasUpsertOne) IDX

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

func (*EnvAliasUpsertOne) Ignore

func (u *EnvAliasUpsertOne) Ignore() *EnvAliasUpsertOne

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

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

func (*EnvAliasUpsertOne) SetEnvID

func (u *EnvAliasUpsertOne) SetEnvID(v string) *EnvAliasUpsertOne

SetEnvID sets the "env_id" field.

func (*EnvAliasUpsertOne) SetIsRenamable

func (u *EnvAliasUpsertOne) SetIsRenamable(v bool) *EnvAliasUpsertOne

SetIsRenamable sets the "is_renamable" field.

func (*EnvAliasUpsertOne) Update

func (u *EnvAliasUpsertOne) Update(set func(*EnvAliasUpsert)) *EnvAliasUpsertOne

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

func (*EnvAliasUpsertOne) UpdateEnvID

func (u *EnvAliasUpsertOne) UpdateEnvID() *EnvAliasUpsertOne

UpdateEnvID sets the "env_id" field to the value that was provided on create.

func (*EnvAliasUpsertOne) UpdateIsRenamable

func (u *EnvAliasUpsertOne) UpdateIsRenamable() *EnvAliasUpsertOne

UpdateIsRenamable sets the "is_renamable" field to the value that was provided on create.

func (*EnvAliasUpsertOne) UpdateNewValues

func (u *EnvAliasUpsertOne) UpdateNewValues() *EnvAliasUpsertOne

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

type EnvBuild

type EnvBuild struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// FinishedAt holds the value of the "finished_at" field.
	FinishedAt *time.Time `json:"finished_at,omitempty"`
	// EnvID holds the value of the "env_id" field.
	EnvID *string `json:"env_id,omitempty"`
	// Status holds the value of the "status" field.
	Status envbuild.Status `json:"status,omitempty"`
	// Dockerfile holds the value of the "dockerfile" field.
	Dockerfile *string `json:"dockerfile,omitempty"`
	// StartCmd holds the value of the "start_cmd" field.
	StartCmd *string `json:"start_cmd,omitempty"`
	// Vcpu holds the value of the "vcpu" field.
	Vcpu int64 `json:"vcpu,omitempty"`
	// RAMMB holds the value of the "ram_mb" field.
	RAMMB int64 `json:"ram_mb,omitempty"`
	// FreeDiskSizeMB holds the value of the "free_disk_size_mb" field.
	FreeDiskSizeMB int64 `json:"free_disk_size_mb,omitempty"`
	// TotalDiskSizeMB holds the value of the "total_disk_size_mb" field.
	TotalDiskSizeMB *int64 `json:"total_disk_size_mb,omitempty"`
	// KernelVersion holds the value of the "kernel_version" field.
	KernelVersion string `json:"kernel_version,omitempty"`
	// FirecrackerVersion holds the value of the "firecracker_version" field.
	FirecrackerVersion string `json:"firecracker_version,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EnvBuildQuery when eager-loading is set.
	Edges EnvBuildEdges `json:"edges"`
	// contains filtered or unexported fields
}

EnvBuild is the model entity for the EnvBuild schema.

func (*EnvBuild) QueryEnv

func (eb *EnvBuild) QueryEnv() *EnvQuery

QueryEnv queries the "env" edge of the EnvBuild entity.

func (*EnvBuild) String

func (eb *EnvBuild) String() string

String implements the fmt.Stringer.

func (*EnvBuild) Unwrap

func (eb *EnvBuild) Unwrap() *EnvBuild

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

func (eb *EnvBuild) Update() *EnvBuildUpdateOne

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

func (*EnvBuild) Value

func (eb *EnvBuild) Value(name string) (ent.Value, error)

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

type EnvBuildClient

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

EnvBuildClient is a client for the EnvBuild schema.

func NewEnvBuildClient

func NewEnvBuildClient(c config) *EnvBuildClient

NewEnvBuildClient returns a client for the EnvBuild from the given config.

func (*EnvBuildClient) Create

func (c *EnvBuildClient) Create() *EnvBuildCreate

Create returns a builder for creating a EnvBuild entity.

func (*EnvBuildClient) CreateBulk

func (c *EnvBuildClient) CreateBulk(builders ...*EnvBuildCreate) *EnvBuildCreateBulk

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

func (*EnvBuildClient) Delete

func (c *EnvBuildClient) Delete() *EnvBuildDelete

Delete returns a delete builder for EnvBuild.

func (*EnvBuildClient) DeleteOne

func (c *EnvBuildClient) DeleteOne(eb *EnvBuild) *EnvBuildDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EnvBuildClient) DeleteOneID

func (c *EnvBuildClient) DeleteOneID(id uuid.UUID) *EnvBuildDeleteOne

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

func (*EnvBuildClient) Get

func (c *EnvBuildClient) Get(ctx context.Context, id uuid.UUID) (*EnvBuild, error)

Get returns a EnvBuild entity by its id.

func (*EnvBuildClient) GetX

func (c *EnvBuildClient) GetX(ctx context.Context, id uuid.UUID) *EnvBuild

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

func (*EnvBuildClient) Hooks

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

Hooks returns the client hooks.

func (*EnvBuildClient) Intercept

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

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

func (*EnvBuildClient) Interceptors

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

Interceptors returns the client interceptors.

func (*EnvBuildClient) MapCreateBulk

func (c *EnvBuildClient) MapCreateBulk(slice any, setFunc func(*EnvBuildCreate, int)) *EnvBuildCreateBulk

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

func (c *EnvBuildClient) Query() *EnvBuildQuery

Query returns a query builder for EnvBuild.

func (*EnvBuildClient) QueryEnv

func (c *EnvBuildClient) QueryEnv(eb *EnvBuild) *EnvQuery

QueryEnv queries the env edge of a EnvBuild.

func (*EnvBuildClient) Update

func (c *EnvBuildClient) Update() *EnvBuildUpdate

Update returns an update builder for EnvBuild.

func (*EnvBuildClient) UpdateOne

func (c *EnvBuildClient) UpdateOne(eb *EnvBuild) *EnvBuildUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EnvBuildClient) UpdateOneID

func (c *EnvBuildClient) UpdateOneID(id uuid.UUID) *EnvBuildUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EnvBuildClient) Use

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

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

type EnvBuildCreate

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

EnvBuildCreate is the builder for creating a EnvBuild entity.

func (*EnvBuildCreate) Exec

func (ebc *EnvBuildCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvBuildCreate) ExecX

func (ebc *EnvBuildCreate) ExecX(ctx context.Context)

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

func (*EnvBuildCreate) Mutation

func (ebc *EnvBuildCreate) Mutation() *EnvBuildMutation

Mutation returns the EnvBuildMutation object of the builder.

func (*EnvBuildCreate) OnConflict

func (ebc *EnvBuildCreate) OnConflict(opts ...sql.ConflictOption) *EnvBuildUpsertOne

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

client.EnvBuild.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EnvBuildUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*EnvBuildCreate) OnConflictColumns

func (ebc *EnvBuildCreate) OnConflictColumns(columns ...string) *EnvBuildUpsertOne

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

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

func (*EnvBuildCreate) Save

func (ebc *EnvBuildCreate) Save(ctx context.Context) (*EnvBuild, error)

Save creates the EnvBuild in the database.

func (*EnvBuildCreate) SaveX

func (ebc *EnvBuildCreate) SaveX(ctx context.Context) *EnvBuild

SaveX calls Save and panics if Save returns an error.

func (*EnvBuildCreate) SetCreatedAt

func (ebc *EnvBuildCreate) SetCreatedAt(t time.Time) *EnvBuildCreate

SetCreatedAt sets the "created_at" field.

func (*EnvBuildCreate) SetDockerfile

func (ebc *EnvBuildCreate) SetDockerfile(s string) *EnvBuildCreate

SetDockerfile sets the "dockerfile" field.

func (*EnvBuildCreate) SetEnv

func (ebc *EnvBuildCreate) SetEnv(e *Env) *EnvBuildCreate

SetEnv sets the "env" edge to the Env entity.

func (*EnvBuildCreate) SetEnvID

func (ebc *EnvBuildCreate) SetEnvID(s string) *EnvBuildCreate

SetEnvID sets the "env_id" field.

func (*EnvBuildCreate) SetFinishedAt

func (ebc *EnvBuildCreate) SetFinishedAt(t time.Time) *EnvBuildCreate

SetFinishedAt sets the "finished_at" field.

func (*EnvBuildCreate) SetFirecrackerVersion

func (ebc *EnvBuildCreate) SetFirecrackerVersion(s string) *EnvBuildCreate

SetFirecrackerVersion sets the "firecracker_version" field.

func (*EnvBuildCreate) SetFreeDiskSizeMB

func (ebc *EnvBuildCreate) SetFreeDiskSizeMB(i int64) *EnvBuildCreate

SetFreeDiskSizeMB sets the "free_disk_size_mb" field.

func (*EnvBuildCreate) SetID

func (ebc *EnvBuildCreate) SetID(u uuid.UUID) *EnvBuildCreate

SetID sets the "id" field.

func (*EnvBuildCreate) SetKernelVersion

func (ebc *EnvBuildCreate) SetKernelVersion(s string) *EnvBuildCreate

SetKernelVersion sets the "kernel_version" field.

func (*EnvBuildCreate) SetNillableCreatedAt

func (ebc *EnvBuildCreate) SetNillableCreatedAt(t *time.Time) *EnvBuildCreate

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

func (*EnvBuildCreate) SetNillableDockerfile

func (ebc *EnvBuildCreate) SetNillableDockerfile(s *string) *EnvBuildCreate

SetNillableDockerfile sets the "dockerfile" field if the given value is not nil.

func (*EnvBuildCreate) SetNillableEnvID

func (ebc *EnvBuildCreate) SetNillableEnvID(s *string) *EnvBuildCreate

SetNillableEnvID sets the "env_id" field if the given value is not nil.

func (*EnvBuildCreate) SetNillableFinishedAt

func (ebc *EnvBuildCreate) SetNillableFinishedAt(t *time.Time) *EnvBuildCreate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*EnvBuildCreate) SetNillableFirecrackerVersion

func (ebc *EnvBuildCreate) SetNillableFirecrackerVersion(s *string) *EnvBuildCreate

SetNillableFirecrackerVersion sets the "firecracker_version" field if the given value is not nil.

func (*EnvBuildCreate) SetNillableKernelVersion

func (ebc *EnvBuildCreate) SetNillableKernelVersion(s *string) *EnvBuildCreate

SetNillableKernelVersion sets the "kernel_version" field if the given value is not nil.

func (*EnvBuildCreate) SetNillableStartCmd

func (ebc *EnvBuildCreate) SetNillableStartCmd(s *string) *EnvBuildCreate

SetNillableStartCmd sets the "start_cmd" field if the given value is not nil.

func (*EnvBuildCreate) SetNillableStatus

func (ebc *EnvBuildCreate) SetNillableStatus(e *envbuild.Status) *EnvBuildCreate

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

func (*EnvBuildCreate) SetNillableTotalDiskSizeMB

func (ebc *EnvBuildCreate) SetNillableTotalDiskSizeMB(i *int64) *EnvBuildCreate

SetNillableTotalDiskSizeMB sets the "total_disk_size_mb" field if the given value is not nil.

func (*EnvBuildCreate) SetNillableUpdatedAt

func (ebc *EnvBuildCreate) SetNillableUpdatedAt(t *time.Time) *EnvBuildCreate

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

func (*EnvBuildCreate) SetRAMMB

func (ebc *EnvBuildCreate) SetRAMMB(i int64) *EnvBuildCreate

SetRAMMB sets the "ram_mb" field.

func (*EnvBuildCreate) SetStartCmd

func (ebc *EnvBuildCreate) SetStartCmd(s string) *EnvBuildCreate

SetStartCmd sets the "start_cmd" field.

func (*EnvBuildCreate) SetStatus

func (ebc *EnvBuildCreate) SetStatus(e envbuild.Status) *EnvBuildCreate

SetStatus sets the "status" field.

func (*EnvBuildCreate) SetTotalDiskSizeMB

func (ebc *EnvBuildCreate) SetTotalDiskSizeMB(i int64) *EnvBuildCreate

SetTotalDiskSizeMB sets the "total_disk_size_mb" field.

func (*EnvBuildCreate) SetUpdatedAt

func (ebc *EnvBuildCreate) SetUpdatedAt(t time.Time) *EnvBuildCreate

SetUpdatedAt sets the "updated_at" field.

func (*EnvBuildCreate) SetVcpu

func (ebc *EnvBuildCreate) SetVcpu(i int64) *EnvBuildCreate

SetVcpu sets the "vcpu" field.

type EnvBuildCreateBulk

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

EnvBuildCreateBulk is the builder for creating many EnvBuild entities in bulk.

func (*EnvBuildCreateBulk) Exec

func (ebcb *EnvBuildCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvBuildCreateBulk) ExecX

func (ebcb *EnvBuildCreateBulk) ExecX(ctx context.Context)

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

func (*EnvBuildCreateBulk) OnConflict

func (ebcb *EnvBuildCreateBulk) OnConflict(opts ...sql.ConflictOption) *EnvBuildUpsertBulk

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

client.EnvBuild.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.EnvBuildUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*EnvBuildCreateBulk) OnConflictColumns

func (ebcb *EnvBuildCreateBulk) OnConflictColumns(columns ...string) *EnvBuildUpsertBulk

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

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

func (*EnvBuildCreateBulk) Save

func (ebcb *EnvBuildCreateBulk) Save(ctx context.Context) ([]*EnvBuild, error)

Save creates the EnvBuild entities in the database.

func (*EnvBuildCreateBulk) SaveX

func (ebcb *EnvBuildCreateBulk) SaveX(ctx context.Context) []*EnvBuild

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

type EnvBuildDelete

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

EnvBuildDelete is the builder for deleting a EnvBuild entity.

func (*EnvBuildDelete) Exec

func (ebd *EnvBuildDelete) Exec(ctx context.Context) (int, error)

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

func (*EnvBuildDelete) ExecX

func (ebd *EnvBuildDelete) ExecX(ctx context.Context) int

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

func (*EnvBuildDelete) Where

func (ebd *EnvBuildDelete) Where(ps ...predicate.EnvBuild) *EnvBuildDelete

Where appends a list predicates to the EnvBuildDelete builder.

type EnvBuildDeleteOne

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

EnvBuildDeleteOne is the builder for deleting a single EnvBuild entity.

func (*EnvBuildDeleteOne) Exec

func (ebdo *EnvBuildDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EnvBuildDeleteOne) ExecX

func (ebdo *EnvBuildDeleteOne) ExecX(ctx context.Context)

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

func (*EnvBuildDeleteOne) Where

Where appends a list predicates to the EnvBuildDelete builder.

type EnvBuildEdges

type EnvBuildEdges struct {
	// Env holds the value of the env edge.
	Env *Env `json:"env,omitempty"`
	// contains filtered or unexported fields
}

EnvBuildEdges holds the relations/edges for other nodes in the graph.

func (EnvBuildEdges) EnvOrErr

func (e EnvBuildEdges) EnvOrErr() (*Env, error)

EnvOrErr returns the Env value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EnvBuildGroupBy

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

EnvBuildGroupBy is the group-by builder for EnvBuild entities.

func (*EnvBuildGroupBy) Aggregate

func (ebgb *EnvBuildGroupBy) Aggregate(fns ...AggregateFunc) *EnvBuildGroupBy

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

func (*EnvBuildGroupBy) Bool

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

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

func (*EnvBuildGroupBy) BoolX

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

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

func (*EnvBuildGroupBy) Bools

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

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

func (*EnvBuildGroupBy) BoolsX

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

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

func (*EnvBuildGroupBy) Float64

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

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

func (*EnvBuildGroupBy) Float64X

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

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

func (*EnvBuildGroupBy) Float64s

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

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

func (*EnvBuildGroupBy) Float64sX

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

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

func (*EnvBuildGroupBy) Int

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

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

func (*EnvBuildGroupBy) IntX

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

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

func (*EnvBuildGroupBy) Ints

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

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

func (*EnvBuildGroupBy) IntsX

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

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

func (*EnvBuildGroupBy) Scan

func (ebgb *EnvBuildGroupBy) Scan(ctx context.Context, v any) error

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

func (*EnvBuildGroupBy) ScanX

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

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

func (*EnvBuildGroupBy) String

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

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

func (*EnvBuildGroupBy) StringX

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

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

func (*EnvBuildGroupBy) Strings

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

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

func (*EnvBuildGroupBy) StringsX

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

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

type EnvBuildMutation

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

EnvBuildMutation represents an operation that mutates the EnvBuild nodes in the graph.

func (*EnvBuildMutation) AddField

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) AddFreeDiskSizeMB

func (m *EnvBuildMutation) AddFreeDiskSizeMB(i int64)

AddFreeDiskSizeMB adds i to the "free_disk_size_mb" field.

func (*EnvBuildMutation) AddRAMMB

func (m *EnvBuildMutation) AddRAMMB(i int64)

AddRAMMB adds i to the "ram_mb" field.

func (*EnvBuildMutation) AddTotalDiskSizeMB

func (m *EnvBuildMutation) AddTotalDiskSizeMB(i int64)

AddTotalDiskSizeMB adds i to the "total_disk_size_mb" field.

func (*EnvBuildMutation) AddVcpu

func (m *EnvBuildMutation) AddVcpu(i int64)

AddVcpu adds i to the "vcpu" field.

func (*EnvBuildMutation) AddedEdges

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

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

func (*EnvBuildMutation) AddedField

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

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

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

func (*EnvBuildMutation) AddedFreeDiskSizeMB

func (m *EnvBuildMutation) AddedFreeDiskSizeMB() (r int64, exists bool)

AddedFreeDiskSizeMB returns the value that was added to the "free_disk_size_mb" field in this mutation.

func (*EnvBuildMutation) AddedIDs

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

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

func (*EnvBuildMutation) AddedRAMMB

func (m *EnvBuildMutation) AddedRAMMB() (r int64, exists bool)

AddedRAMMB returns the value that was added to the "ram_mb" field in this mutation.

func (*EnvBuildMutation) AddedTotalDiskSizeMB

func (m *EnvBuildMutation) AddedTotalDiskSizeMB() (r int64, exists bool)

AddedTotalDiskSizeMB returns the value that was added to the "total_disk_size_mb" field in this mutation.

func (*EnvBuildMutation) AddedVcpu

func (m *EnvBuildMutation) AddedVcpu() (r int64, exists bool)

AddedVcpu returns the value that was added to the "vcpu" field in this mutation.

func (*EnvBuildMutation) ClearDockerfile

func (m *EnvBuildMutation) ClearDockerfile()

ClearDockerfile clears the value of the "dockerfile" field.

func (*EnvBuildMutation) ClearEdge

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) ClearEnv

func (m *EnvBuildMutation) ClearEnv()

ClearEnv clears the "env" edge to the Env entity.

func (*EnvBuildMutation) ClearEnvID

func (m *EnvBuildMutation) ClearEnvID()

ClearEnvID clears the value of the "env_id" field.

func (*EnvBuildMutation) ClearField

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) ClearFinishedAt

func (m *EnvBuildMutation) ClearFinishedAt()

ClearFinishedAt clears the value of the "finished_at" field.

func (*EnvBuildMutation) ClearStartCmd

func (m *EnvBuildMutation) ClearStartCmd()

ClearStartCmd clears the value of the "start_cmd" field.

func (*EnvBuildMutation) ClearTotalDiskSizeMB

func (m *EnvBuildMutation) ClearTotalDiskSizeMB()

ClearTotalDiskSizeMB clears the value of the "total_disk_size_mb" field.

func (*EnvBuildMutation) ClearedEdges

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

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

func (*EnvBuildMutation) ClearedFields

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

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

func (EnvBuildMutation) Client

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

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

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

func (*EnvBuildMutation) Dockerfile

func (m *EnvBuildMutation) Dockerfile() (r string, exists bool)

Dockerfile returns the value of the "dockerfile" field in the mutation.

func (*EnvBuildMutation) DockerfileCleared

func (m *EnvBuildMutation) DockerfileCleared() bool

DockerfileCleared returns if the "dockerfile" field was cleared in this mutation.

func (*EnvBuildMutation) EdgeCleared

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

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

func (*EnvBuildMutation) EnvCleared

func (m *EnvBuildMutation) EnvCleared() bool

EnvCleared reports if the "env" edge to the Env entity was cleared.

func (*EnvBuildMutation) EnvID

func (m *EnvBuildMutation) EnvID() (r string, exists bool)

EnvID returns the value of the "env_id" field in the mutation.

func (*EnvBuildMutation) EnvIDCleared

func (m *EnvBuildMutation) EnvIDCleared() bool

EnvIDCleared returns if the "env_id" field was cleared in this mutation.

func (*EnvBuildMutation) EnvIDs

func (m *EnvBuildMutation) EnvIDs() (ids []string)

EnvIDs returns the "env" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EnvID instead. It exists only for internal usage by the builders.

func (*EnvBuildMutation) Field

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

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

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

func (*EnvBuildMutation) Fields

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) FinishedAt

func (m *EnvBuildMutation) FinishedAt() (r time.Time, exists bool)

FinishedAt returns the value of the "finished_at" field in the mutation.

func (*EnvBuildMutation) FinishedAtCleared

func (m *EnvBuildMutation) FinishedAtCleared() bool

FinishedAtCleared returns if the "finished_at" field was cleared in this mutation.

func (*EnvBuildMutation) FirecrackerVersion

func (m *EnvBuildMutation) FirecrackerVersion() (r string, exists bool)

FirecrackerVersion returns the value of the "firecracker_version" field in the mutation.

func (*EnvBuildMutation) FreeDiskSizeMB

func (m *EnvBuildMutation) FreeDiskSizeMB() (r int64, exists bool)

FreeDiskSizeMB returns the value of the "free_disk_size_mb" field in the mutation.

func (*EnvBuildMutation) ID

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

func (m *EnvBuildMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*EnvBuildMutation) KernelVersion

func (m *EnvBuildMutation) KernelVersion() (r string, exists bool)

KernelVersion returns the value of the "kernel_version" field in the mutation.

func (*EnvBuildMutation) OldCreatedAt

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

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

func (m *EnvBuildMutation) OldDockerfile(ctx context.Context) (v *string, err error)

OldDockerfile returns the old "dockerfile" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldEnvID

func (m *EnvBuildMutation) OldEnvID(ctx context.Context) (v *string, err error)

OldEnvID returns the old "env_id" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldField

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) OldFinishedAt

func (m *EnvBuildMutation) OldFinishedAt(ctx context.Context) (v *time.Time, err error)

OldFinishedAt returns the old "finished_at" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldFirecrackerVersion

func (m *EnvBuildMutation) OldFirecrackerVersion(ctx context.Context) (v string, err error)

OldFirecrackerVersion returns the old "firecracker_version" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldFreeDiskSizeMB

func (m *EnvBuildMutation) OldFreeDiskSizeMB(ctx context.Context) (v int64, err error)

OldFreeDiskSizeMB returns the old "free_disk_size_mb" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldKernelVersion

func (m *EnvBuildMutation) OldKernelVersion(ctx context.Context) (v string, err error)

OldKernelVersion returns the old "kernel_version" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldRAMMB

func (m *EnvBuildMutation) OldRAMMB(ctx context.Context) (v int64, err error)

OldRAMMB returns the old "ram_mb" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldStartCmd

func (m *EnvBuildMutation) OldStartCmd(ctx context.Context) (v *string, err error)

OldStartCmd returns the old "start_cmd" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldStatus

func (m *EnvBuildMutation) OldStatus(ctx context.Context) (v envbuild.Status, err error)

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

func (m *EnvBuildMutation) OldTotalDiskSizeMB(ctx context.Context) (v *int64, err error)

OldTotalDiskSizeMB returns the old "total_disk_size_mb" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) OldVcpu

func (m *EnvBuildMutation) OldVcpu(ctx context.Context) (v int64, err error)

OldVcpu returns the old "vcpu" field's value of the EnvBuild entity. If the EnvBuild 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 (*EnvBuildMutation) Op

func (m *EnvBuildMutation) Op() Op

Op returns the operation name.

func (*EnvBuildMutation) RAMMB

func (m *EnvBuildMutation) RAMMB() (r int64, exists bool)

RAMMB returns the value of the "ram_mb" field in the mutation.

func (*EnvBuildMutation) RemovedEdges

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

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

func (*EnvBuildMutation) RemovedIDs

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

func (m *EnvBuildMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EnvBuildMutation) ResetDockerfile

func (m *EnvBuildMutation) ResetDockerfile()

ResetDockerfile resets all changes to the "dockerfile" field.

func (*EnvBuildMutation) ResetEdge

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) ResetEnv

func (m *EnvBuildMutation) ResetEnv()

ResetEnv resets all changes to the "env" edge.

func (*EnvBuildMutation) ResetEnvID

func (m *EnvBuildMutation) ResetEnvID()

ResetEnvID resets all changes to the "env_id" field.

func (*EnvBuildMutation) ResetField

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) ResetFinishedAt

func (m *EnvBuildMutation) ResetFinishedAt()

ResetFinishedAt resets all changes to the "finished_at" field.

func (*EnvBuildMutation) ResetFirecrackerVersion

func (m *EnvBuildMutation) ResetFirecrackerVersion()

ResetFirecrackerVersion resets all changes to the "firecracker_version" field.

func (*EnvBuildMutation) ResetFreeDiskSizeMB

func (m *EnvBuildMutation) ResetFreeDiskSizeMB()

ResetFreeDiskSizeMB resets all changes to the "free_disk_size_mb" field.

func (*EnvBuildMutation) ResetKernelVersion

func (m *EnvBuildMutation) ResetKernelVersion()

ResetKernelVersion resets all changes to the "kernel_version" field.

func (*EnvBuildMutation) ResetRAMMB

func (m *EnvBuildMutation) ResetRAMMB()

ResetRAMMB resets all changes to the "ram_mb" field.

func (*EnvBuildMutation) ResetStartCmd

func (m *EnvBuildMutation) ResetStartCmd()

ResetStartCmd resets all changes to the "start_cmd" field.

func (*EnvBuildMutation) ResetStatus

func (m *EnvBuildMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*EnvBuildMutation) ResetTotalDiskSizeMB

func (m *EnvBuildMutation) ResetTotalDiskSizeMB()

ResetTotalDiskSizeMB resets all changes to the "total_disk_size_mb" field.

func (*EnvBuildMutation) ResetUpdatedAt

func (m *EnvBuildMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*EnvBuildMutation) ResetVcpu

func (m *EnvBuildMutation) ResetVcpu()

ResetVcpu resets all changes to the "vcpu" field.

func (*EnvBuildMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*EnvBuildMutation) SetDockerfile

func (m *EnvBuildMutation) SetDockerfile(s string)

SetDockerfile sets the "dockerfile" field.

func (*EnvBuildMutation) SetEnvID

func (m *EnvBuildMutation) SetEnvID(s string)

SetEnvID sets the "env_id" field.

func (*EnvBuildMutation) SetField

func (m *EnvBuildMutation) 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 (*EnvBuildMutation) SetFinishedAt

func (m *EnvBuildMutation) SetFinishedAt(t time.Time)

SetFinishedAt sets the "finished_at" field.

func (*EnvBuildMutation) SetFirecrackerVersion

func (m *EnvBuildMutation) SetFirecrackerVersion(s string)

SetFirecrackerVersion sets the "firecracker_version" field.

func (*EnvBuildMutation) SetFreeDiskSizeMB

func (m *EnvBuildMutation) SetFreeDiskSizeMB(i int64)

SetFreeDiskSizeMB sets the "free_disk_size_mb" field.

func (*EnvBuildMutation) SetID

func (m *EnvBuildMutation) SetID(id uuid.UUID)

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

func (*EnvBuildMutation) SetKernelVersion

func (m *EnvBuildMutation) SetKernelVersion(s string)

SetKernelVersion sets the "kernel_version" field.

func (*EnvBuildMutation) SetOp

func (m *EnvBuildMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EnvBuildMutation) SetRAMMB

func (m *EnvBuildMutation) SetRAMMB(i int64)

SetRAMMB sets the "ram_mb" field.

func (*EnvBuildMutation) SetStartCmd

func (m *EnvBuildMutation) SetStartCmd(s string)

SetStartCmd sets the "start_cmd" field.

func (*EnvBuildMutation) SetStatus

func (m *EnvBuildMutation) SetStatus(e envbuild.Status)

SetStatus sets the "status" field.

func (*EnvBuildMutation) SetTotalDiskSizeMB

func (m *EnvBuildMutation) SetTotalDiskSizeMB(i int64)

SetTotalDiskSizeMB sets the "total_disk_size_mb" field.

func (*EnvBuildMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EnvBuildMutation) SetVcpu

func (m *EnvBuildMutation) SetVcpu(i int64)

SetVcpu sets the "vcpu" field.

func (*EnvBuildMutation) StartCmd

func (m *EnvBuildMutation) StartCmd() (r string, exists bool)

StartCmd returns the value of the "start_cmd" field in the mutation.

func (*EnvBuildMutation) StartCmdCleared

func (m *EnvBuildMutation) StartCmdCleared() bool

StartCmdCleared returns if the "start_cmd" field was cleared in this mutation.

func (*EnvBuildMutation) Status

func (m *EnvBuildMutation) Status() (r envbuild.Status, exists bool)

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

func (*EnvBuildMutation) TotalDiskSizeMB

func (m *EnvBuildMutation) TotalDiskSizeMB() (r int64, exists bool)

TotalDiskSizeMB returns the value of the "total_disk_size_mb" field in the mutation.

func (*EnvBuildMutation) TotalDiskSizeMBCleared

func (m *EnvBuildMutation) TotalDiskSizeMBCleared() bool

TotalDiskSizeMBCleared returns if the "total_disk_size_mb" field was cleared in this mutation.

func (EnvBuildMutation) Tx

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

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

func (*EnvBuildMutation) Type

func (m *EnvBuildMutation) Type() string

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

func (*EnvBuildMutation) UpdatedAt

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

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

func (*EnvBuildMutation) Vcpu

func (m *EnvBuildMutation) Vcpu() (r int64, exists bool)

Vcpu returns the value of the "vcpu" field in the mutation.

func (*EnvBuildMutation) Where

func (m *EnvBuildMutation) Where(ps ...predicate.EnvBuild)

Where appends a list predicates to the EnvBuildMutation builder.

func (*EnvBuildMutation) WhereP

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

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

type EnvBuildQuery

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

EnvBuildQuery is the builder for querying EnvBuild entities.

func (*EnvBuildQuery) Aggregate

func (ebq *EnvBuildQuery) Aggregate(fns ...AggregateFunc) *EnvBuildSelect

Aggregate returns a EnvBuildSelect configured with the given aggregations.

func (*EnvBuildQuery) All

func (ebq *EnvBuildQuery) All(ctx context.Context) ([]*EnvBuild, error)

All executes the query and returns a list of EnvBuilds.

func (*EnvBuildQuery) AllX

func (ebq *EnvBuildQuery) AllX(ctx context.Context) []*EnvBuild

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

func (*EnvBuildQuery) Clone

func (ebq *EnvBuildQuery) Clone() *EnvBuildQuery

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

func (*EnvBuildQuery) Count

func (ebq *EnvBuildQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EnvBuildQuery) CountX

func (ebq *EnvBuildQuery) CountX(ctx context.Context) int

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

func (*EnvBuildQuery) Exist

func (ebq *EnvBuildQuery) Exist(ctx context.Context) (bool, error)

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

func (*EnvBuildQuery) ExistX

func (ebq *EnvBuildQuery) ExistX(ctx context.Context) bool

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

func (*EnvBuildQuery) First

func (ebq *EnvBuildQuery) First(ctx context.Context) (*EnvBuild, error)

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

func (*EnvBuildQuery) FirstID

func (ebq *EnvBuildQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*EnvBuildQuery) FirstIDX

func (ebq *EnvBuildQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*EnvBuildQuery) FirstX

func (ebq *EnvBuildQuery) FirstX(ctx context.Context) *EnvBuild

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

func (*EnvBuildQuery) GroupBy

func (ebq *EnvBuildQuery) GroupBy(field string, fields ...string) *EnvBuildGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EnvBuild.Query().
	GroupBy(envbuild.FieldCreatedAt).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*EnvBuildQuery) IDs

func (ebq *EnvBuildQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*EnvBuildQuery) IDsX

func (ebq *EnvBuildQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*EnvBuildQuery) Limit

func (ebq *EnvBuildQuery) Limit(limit int) *EnvBuildQuery

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

func (*EnvBuildQuery) Modify

func (ebq *EnvBuildQuery) Modify(modifiers ...func(s *sql.Selector)) *EnvBuildSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvBuildQuery) Offset

func (ebq *EnvBuildQuery) Offset(offset int) *EnvBuildQuery

Offset to start from.

func (*EnvBuildQuery) Only

func (ebq *EnvBuildQuery) Only(ctx context.Context) (*EnvBuild, error)

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

func (*EnvBuildQuery) OnlyID

func (ebq *EnvBuildQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*EnvBuildQuery) OnlyIDX

func (ebq *EnvBuildQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*EnvBuildQuery) OnlyX

func (ebq *EnvBuildQuery) OnlyX(ctx context.Context) *EnvBuild

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

func (*EnvBuildQuery) Order

func (ebq *EnvBuildQuery) Order(o ...envbuild.OrderOption) *EnvBuildQuery

Order specifies how the records should be ordered.

func (*EnvBuildQuery) QueryEnv

func (ebq *EnvBuildQuery) QueryEnv() *EnvQuery

QueryEnv chains the current query on the "env" edge.

func (*EnvBuildQuery) Select

func (ebq *EnvBuildQuery) Select(fields ...string) *EnvBuildSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.EnvBuild.Query().
	Select(envbuild.FieldCreatedAt).
	Scan(ctx, &v)

func (*EnvBuildQuery) Unique

func (ebq *EnvBuildQuery) Unique(unique bool) *EnvBuildQuery

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

func (ebq *EnvBuildQuery) Where(ps ...predicate.EnvBuild) *EnvBuildQuery

Where adds a new predicate for the EnvBuildQuery builder.

func (*EnvBuildQuery) WithEnv

func (ebq *EnvBuildQuery) WithEnv(opts ...func(*EnvQuery)) *EnvBuildQuery

WithEnv tells the query-builder to eager-load the nodes that are connected to the "env" edge. The optional arguments are used to configure the query builder of the edge.

type EnvBuildSelect

type EnvBuildSelect struct {
	*EnvBuildQuery
	// contains filtered or unexported fields
}

EnvBuildSelect is the builder for selecting fields of EnvBuild entities.

func (*EnvBuildSelect) Aggregate

func (ebs *EnvBuildSelect) Aggregate(fns ...AggregateFunc) *EnvBuildSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EnvBuildSelect) Bool

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

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

func (*EnvBuildSelect) BoolX

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

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

func (*EnvBuildSelect) Bools

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

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

func (*EnvBuildSelect) BoolsX

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

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

func (*EnvBuildSelect) Float64

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

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

func (*EnvBuildSelect) Float64X

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

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

func (*EnvBuildSelect) Float64s

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

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

func (*EnvBuildSelect) Float64sX

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

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

func (*EnvBuildSelect) Int

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

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

func (*EnvBuildSelect) IntX

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

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

func (*EnvBuildSelect) Ints

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

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

func (*EnvBuildSelect) IntsX

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

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

func (*EnvBuildSelect) Modify

func (ebs *EnvBuildSelect) Modify(modifiers ...func(s *sql.Selector)) *EnvBuildSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvBuildSelect) Scan

func (ebs *EnvBuildSelect) Scan(ctx context.Context, v any) error

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

func (*EnvBuildSelect) ScanX

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

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

func (*EnvBuildSelect) String

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

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

func (*EnvBuildSelect) StringX

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

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

func (*EnvBuildSelect) Strings

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

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

func (*EnvBuildSelect) StringsX

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

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

type EnvBuildUpdate

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

EnvBuildUpdate is the builder for updating EnvBuild entities.

func (*EnvBuildUpdate) AddFreeDiskSizeMB

func (ebu *EnvBuildUpdate) AddFreeDiskSizeMB(i int64) *EnvBuildUpdate

AddFreeDiskSizeMB adds i to the "free_disk_size_mb" field.

func (*EnvBuildUpdate) AddRAMMB

func (ebu *EnvBuildUpdate) AddRAMMB(i int64) *EnvBuildUpdate

AddRAMMB adds i to the "ram_mb" field.

func (*EnvBuildUpdate) AddTotalDiskSizeMB

func (ebu *EnvBuildUpdate) AddTotalDiskSizeMB(i int64) *EnvBuildUpdate

AddTotalDiskSizeMB adds i to the "total_disk_size_mb" field.

func (*EnvBuildUpdate) AddVcpu

func (ebu *EnvBuildUpdate) AddVcpu(i int64) *EnvBuildUpdate

AddVcpu adds i to the "vcpu" field.

func (*EnvBuildUpdate) ClearDockerfile

func (ebu *EnvBuildUpdate) ClearDockerfile() *EnvBuildUpdate

ClearDockerfile clears the value of the "dockerfile" field.

func (*EnvBuildUpdate) ClearEnv

func (ebu *EnvBuildUpdate) ClearEnv() *EnvBuildUpdate

ClearEnv clears the "env" edge to the Env entity.

func (*EnvBuildUpdate) ClearEnvID

func (ebu *EnvBuildUpdate) ClearEnvID() *EnvBuildUpdate

ClearEnvID clears the value of the "env_id" field.

func (*EnvBuildUpdate) ClearFinishedAt

func (ebu *EnvBuildUpdate) ClearFinishedAt() *EnvBuildUpdate

ClearFinishedAt clears the value of the "finished_at" field.

func (*EnvBuildUpdate) ClearStartCmd

func (ebu *EnvBuildUpdate) ClearStartCmd() *EnvBuildUpdate

ClearStartCmd clears the value of the "start_cmd" field.

func (*EnvBuildUpdate) ClearTotalDiskSizeMB

func (ebu *EnvBuildUpdate) ClearTotalDiskSizeMB() *EnvBuildUpdate

ClearTotalDiskSizeMB clears the value of the "total_disk_size_mb" field.

func (*EnvBuildUpdate) Exec

func (ebu *EnvBuildUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvBuildUpdate) ExecX

func (ebu *EnvBuildUpdate) ExecX(ctx context.Context)

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

func (*EnvBuildUpdate) Modify

func (ebu *EnvBuildUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvBuildUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvBuildUpdate) Mutation

func (ebu *EnvBuildUpdate) Mutation() *EnvBuildMutation

Mutation returns the EnvBuildMutation object of the builder.

func (*EnvBuildUpdate) Save

func (ebu *EnvBuildUpdate) Save(ctx context.Context) (int, error)

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

func (*EnvBuildUpdate) SaveX

func (ebu *EnvBuildUpdate) SaveX(ctx context.Context) int

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

func (*EnvBuildUpdate) SetDockerfile

func (ebu *EnvBuildUpdate) SetDockerfile(s string) *EnvBuildUpdate

SetDockerfile sets the "dockerfile" field.

func (*EnvBuildUpdate) SetEnv

func (ebu *EnvBuildUpdate) SetEnv(e *Env) *EnvBuildUpdate

SetEnv sets the "env" edge to the Env entity.

func (*EnvBuildUpdate) SetEnvID

func (ebu *EnvBuildUpdate) SetEnvID(s string) *EnvBuildUpdate

SetEnvID sets the "env_id" field.

func (*EnvBuildUpdate) SetFinishedAt

func (ebu *EnvBuildUpdate) SetFinishedAt(t time.Time) *EnvBuildUpdate

SetFinishedAt sets the "finished_at" field.

func (*EnvBuildUpdate) SetFirecrackerVersion

func (ebu *EnvBuildUpdate) SetFirecrackerVersion(s string) *EnvBuildUpdate

SetFirecrackerVersion sets the "firecracker_version" field.

func (*EnvBuildUpdate) SetFreeDiskSizeMB

func (ebu *EnvBuildUpdate) SetFreeDiskSizeMB(i int64) *EnvBuildUpdate

SetFreeDiskSizeMB sets the "free_disk_size_mb" field.

func (*EnvBuildUpdate) SetKernelVersion

func (ebu *EnvBuildUpdate) SetKernelVersion(s string) *EnvBuildUpdate

SetKernelVersion sets the "kernel_version" field.

func (*EnvBuildUpdate) SetNillableDockerfile

func (ebu *EnvBuildUpdate) SetNillableDockerfile(s *string) *EnvBuildUpdate

SetNillableDockerfile sets the "dockerfile" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableEnvID

func (ebu *EnvBuildUpdate) SetNillableEnvID(s *string) *EnvBuildUpdate

SetNillableEnvID sets the "env_id" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableFinishedAt

func (ebu *EnvBuildUpdate) SetNillableFinishedAt(t *time.Time) *EnvBuildUpdate

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableFirecrackerVersion

func (ebu *EnvBuildUpdate) SetNillableFirecrackerVersion(s *string) *EnvBuildUpdate

SetNillableFirecrackerVersion sets the "firecracker_version" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableFreeDiskSizeMB

func (ebu *EnvBuildUpdate) SetNillableFreeDiskSizeMB(i *int64) *EnvBuildUpdate

SetNillableFreeDiskSizeMB sets the "free_disk_size_mb" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableKernelVersion

func (ebu *EnvBuildUpdate) SetNillableKernelVersion(s *string) *EnvBuildUpdate

SetNillableKernelVersion sets the "kernel_version" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableRAMMB

func (ebu *EnvBuildUpdate) SetNillableRAMMB(i *int64) *EnvBuildUpdate

SetNillableRAMMB sets the "ram_mb" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableStartCmd

func (ebu *EnvBuildUpdate) SetNillableStartCmd(s *string) *EnvBuildUpdate

SetNillableStartCmd sets the "start_cmd" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableStatus

func (ebu *EnvBuildUpdate) SetNillableStatus(e *envbuild.Status) *EnvBuildUpdate

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

func (*EnvBuildUpdate) SetNillableTotalDiskSizeMB

func (ebu *EnvBuildUpdate) SetNillableTotalDiskSizeMB(i *int64) *EnvBuildUpdate

SetNillableTotalDiskSizeMB sets the "total_disk_size_mb" field if the given value is not nil.

func (*EnvBuildUpdate) SetNillableUpdatedAt

func (ebu *EnvBuildUpdate) SetNillableUpdatedAt(t *time.Time) *EnvBuildUpdate

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

func (*EnvBuildUpdate) SetNillableVcpu

func (ebu *EnvBuildUpdate) SetNillableVcpu(i *int64) *EnvBuildUpdate

SetNillableVcpu sets the "vcpu" field if the given value is not nil.

func (*EnvBuildUpdate) SetRAMMB

func (ebu *EnvBuildUpdate) SetRAMMB(i int64) *EnvBuildUpdate

SetRAMMB sets the "ram_mb" field.

func (*EnvBuildUpdate) SetStartCmd

func (ebu *EnvBuildUpdate) SetStartCmd(s string) *EnvBuildUpdate

SetStartCmd sets the "start_cmd" field.

func (*EnvBuildUpdate) SetStatus

func (ebu *EnvBuildUpdate) SetStatus(e envbuild.Status) *EnvBuildUpdate

SetStatus sets the "status" field.

func (*EnvBuildUpdate) SetTotalDiskSizeMB

func (ebu *EnvBuildUpdate) SetTotalDiskSizeMB(i int64) *EnvBuildUpdate

SetTotalDiskSizeMB sets the "total_disk_size_mb" field.

func (*EnvBuildUpdate) SetUpdatedAt

func (ebu *EnvBuildUpdate) SetUpdatedAt(t time.Time) *EnvBuildUpdate

SetUpdatedAt sets the "updated_at" field.

func (*EnvBuildUpdate) SetVcpu

func (ebu *EnvBuildUpdate) SetVcpu(i int64) *EnvBuildUpdate

SetVcpu sets the "vcpu" field.

func (*EnvBuildUpdate) Where

func (ebu *EnvBuildUpdate) Where(ps ...predicate.EnvBuild) *EnvBuildUpdate

Where appends a list predicates to the EnvBuildUpdate builder.

type EnvBuildUpdateOne

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

EnvBuildUpdateOne is the builder for updating a single EnvBuild entity.

func (*EnvBuildUpdateOne) AddFreeDiskSizeMB

func (ebuo *EnvBuildUpdateOne) AddFreeDiskSizeMB(i int64) *EnvBuildUpdateOne

AddFreeDiskSizeMB adds i to the "free_disk_size_mb" field.

func (*EnvBuildUpdateOne) AddRAMMB

func (ebuo *EnvBuildUpdateOne) AddRAMMB(i int64) *EnvBuildUpdateOne

AddRAMMB adds i to the "ram_mb" field.

func (*EnvBuildUpdateOne) AddTotalDiskSizeMB

func (ebuo *EnvBuildUpdateOne) AddTotalDiskSizeMB(i int64) *EnvBuildUpdateOne

AddTotalDiskSizeMB adds i to the "total_disk_size_mb" field.

func (*EnvBuildUpdateOne) AddVcpu

func (ebuo *EnvBuildUpdateOne) AddVcpu(i int64) *EnvBuildUpdateOne

AddVcpu adds i to the "vcpu" field.

func (*EnvBuildUpdateOne) ClearDockerfile

func (ebuo *EnvBuildUpdateOne) ClearDockerfile() *EnvBuildUpdateOne

ClearDockerfile clears the value of the "dockerfile" field.

func (*EnvBuildUpdateOne) ClearEnv

func (ebuo *EnvBuildUpdateOne) ClearEnv() *EnvBuildUpdateOne

ClearEnv clears the "env" edge to the Env entity.

func (*EnvBuildUpdateOne) ClearEnvID

func (ebuo *EnvBuildUpdateOne) ClearEnvID() *EnvBuildUpdateOne

ClearEnvID clears the value of the "env_id" field.

func (*EnvBuildUpdateOne) ClearFinishedAt

func (ebuo *EnvBuildUpdateOne) ClearFinishedAt() *EnvBuildUpdateOne

ClearFinishedAt clears the value of the "finished_at" field.

func (*EnvBuildUpdateOne) ClearStartCmd

func (ebuo *EnvBuildUpdateOne) ClearStartCmd() *EnvBuildUpdateOne

ClearStartCmd clears the value of the "start_cmd" field.

func (*EnvBuildUpdateOne) ClearTotalDiskSizeMB

func (ebuo *EnvBuildUpdateOne) ClearTotalDiskSizeMB() *EnvBuildUpdateOne

ClearTotalDiskSizeMB clears the value of the "total_disk_size_mb" field.

func (*EnvBuildUpdateOne) Exec

func (ebuo *EnvBuildUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EnvBuildUpdateOne) ExecX

func (ebuo *EnvBuildUpdateOne) ExecX(ctx context.Context)

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

func (*EnvBuildUpdateOne) Modify

func (ebuo *EnvBuildUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvBuildUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvBuildUpdateOne) Mutation

func (ebuo *EnvBuildUpdateOne) Mutation() *EnvBuildMutation

Mutation returns the EnvBuildMutation object of the builder.

func (*EnvBuildUpdateOne) Save

func (ebuo *EnvBuildUpdateOne) Save(ctx context.Context) (*EnvBuild, error)

Save executes the query and returns the updated EnvBuild entity.

func (*EnvBuildUpdateOne) SaveX

func (ebuo *EnvBuildUpdateOne) SaveX(ctx context.Context) *EnvBuild

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

func (*EnvBuildUpdateOne) Select

func (ebuo *EnvBuildUpdateOne) Select(field string, fields ...string) *EnvBuildUpdateOne

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

func (*EnvBuildUpdateOne) SetDockerfile

func (ebuo *EnvBuildUpdateOne) SetDockerfile(s string) *EnvBuildUpdateOne

SetDockerfile sets the "dockerfile" field.

func (*EnvBuildUpdateOne) SetEnv

func (ebuo *EnvBuildUpdateOne) SetEnv(e *Env) *EnvBuildUpdateOne

SetEnv sets the "env" edge to the Env entity.

func (*EnvBuildUpdateOne) SetEnvID

func (ebuo *EnvBuildUpdateOne) SetEnvID(s string) *EnvBuildUpdateOne

SetEnvID sets the "env_id" field.

func (*EnvBuildUpdateOne) SetFinishedAt

func (ebuo *EnvBuildUpdateOne) SetFinishedAt(t time.Time) *EnvBuildUpdateOne

SetFinishedAt sets the "finished_at" field.

func (*EnvBuildUpdateOne) SetFirecrackerVersion

func (ebuo *EnvBuildUpdateOne) SetFirecrackerVersion(s string) *EnvBuildUpdateOne

SetFirecrackerVersion sets the "firecracker_version" field.

func (*EnvBuildUpdateOne) SetFreeDiskSizeMB

func (ebuo *EnvBuildUpdateOne) SetFreeDiskSizeMB(i int64) *EnvBuildUpdateOne

SetFreeDiskSizeMB sets the "free_disk_size_mb" field.

func (*EnvBuildUpdateOne) SetKernelVersion

func (ebuo *EnvBuildUpdateOne) SetKernelVersion(s string) *EnvBuildUpdateOne

SetKernelVersion sets the "kernel_version" field.

func (*EnvBuildUpdateOne) SetNillableDockerfile

func (ebuo *EnvBuildUpdateOne) SetNillableDockerfile(s *string) *EnvBuildUpdateOne

SetNillableDockerfile sets the "dockerfile" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableEnvID

func (ebuo *EnvBuildUpdateOne) SetNillableEnvID(s *string) *EnvBuildUpdateOne

SetNillableEnvID sets the "env_id" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableFinishedAt

func (ebuo *EnvBuildUpdateOne) SetNillableFinishedAt(t *time.Time) *EnvBuildUpdateOne

SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableFirecrackerVersion

func (ebuo *EnvBuildUpdateOne) SetNillableFirecrackerVersion(s *string) *EnvBuildUpdateOne

SetNillableFirecrackerVersion sets the "firecracker_version" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableFreeDiskSizeMB

func (ebuo *EnvBuildUpdateOne) SetNillableFreeDiskSizeMB(i *int64) *EnvBuildUpdateOne

SetNillableFreeDiskSizeMB sets the "free_disk_size_mb" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableKernelVersion

func (ebuo *EnvBuildUpdateOne) SetNillableKernelVersion(s *string) *EnvBuildUpdateOne

SetNillableKernelVersion sets the "kernel_version" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableRAMMB

func (ebuo *EnvBuildUpdateOne) SetNillableRAMMB(i *int64) *EnvBuildUpdateOne

SetNillableRAMMB sets the "ram_mb" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableStartCmd

func (ebuo *EnvBuildUpdateOne) SetNillableStartCmd(s *string) *EnvBuildUpdateOne

SetNillableStartCmd sets the "start_cmd" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableStatus

func (ebuo *EnvBuildUpdateOne) SetNillableStatus(e *envbuild.Status) *EnvBuildUpdateOne

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

func (*EnvBuildUpdateOne) SetNillableTotalDiskSizeMB

func (ebuo *EnvBuildUpdateOne) SetNillableTotalDiskSizeMB(i *int64) *EnvBuildUpdateOne

SetNillableTotalDiskSizeMB sets the "total_disk_size_mb" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetNillableUpdatedAt

func (ebuo *EnvBuildUpdateOne) SetNillableUpdatedAt(t *time.Time) *EnvBuildUpdateOne

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

func (*EnvBuildUpdateOne) SetNillableVcpu

func (ebuo *EnvBuildUpdateOne) SetNillableVcpu(i *int64) *EnvBuildUpdateOne

SetNillableVcpu sets the "vcpu" field if the given value is not nil.

func (*EnvBuildUpdateOne) SetRAMMB

func (ebuo *EnvBuildUpdateOne) SetRAMMB(i int64) *EnvBuildUpdateOne

SetRAMMB sets the "ram_mb" field.

func (*EnvBuildUpdateOne) SetStartCmd

func (ebuo *EnvBuildUpdateOne) SetStartCmd(s string) *EnvBuildUpdateOne

SetStartCmd sets the "start_cmd" field.

func (*EnvBuildUpdateOne) SetStatus

func (ebuo *EnvBuildUpdateOne) SetStatus(e envbuild.Status) *EnvBuildUpdateOne

SetStatus sets the "status" field.

func (*EnvBuildUpdateOne) SetTotalDiskSizeMB

func (ebuo *EnvBuildUpdateOne) SetTotalDiskSizeMB(i int64) *EnvBuildUpdateOne

SetTotalDiskSizeMB sets the "total_disk_size_mb" field.

func (*EnvBuildUpdateOne) SetUpdatedAt

func (ebuo *EnvBuildUpdateOne) SetUpdatedAt(t time.Time) *EnvBuildUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*EnvBuildUpdateOne) SetVcpu

func (ebuo *EnvBuildUpdateOne) SetVcpu(i int64) *EnvBuildUpdateOne

SetVcpu sets the "vcpu" field.

func (*EnvBuildUpdateOne) Where

Where appends a list predicates to the EnvBuildUpdate builder.

type EnvBuildUpsert

type EnvBuildUpsert struct {
	*sql.UpdateSet
}

EnvBuildUpsert is the "OnConflict" setter.

func (*EnvBuildUpsert) AddFreeDiskSizeMB

func (u *EnvBuildUpsert) AddFreeDiskSizeMB(v int64) *EnvBuildUpsert

AddFreeDiskSizeMB adds v to the "free_disk_size_mb" field.

func (*EnvBuildUpsert) AddRAMMB

func (u *EnvBuildUpsert) AddRAMMB(v int64) *EnvBuildUpsert

AddRAMMB adds v to the "ram_mb" field.

func (*EnvBuildUpsert) AddTotalDiskSizeMB

func (u *EnvBuildUpsert) AddTotalDiskSizeMB(v int64) *EnvBuildUpsert

AddTotalDiskSizeMB adds v to the "total_disk_size_mb" field.

func (*EnvBuildUpsert) AddVcpu

func (u *EnvBuildUpsert) AddVcpu(v int64) *EnvBuildUpsert

AddVcpu adds v to the "vcpu" field.

func (*EnvBuildUpsert) ClearDockerfile

func (u *EnvBuildUpsert) ClearDockerfile() *EnvBuildUpsert

ClearDockerfile clears the value of the "dockerfile" field.

func (*EnvBuildUpsert) ClearEnvID

func (u *EnvBuildUpsert) ClearEnvID() *EnvBuildUpsert

ClearEnvID clears the value of the "env_id" field.

func (*EnvBuildUpsert) ClearFinishedAt

func (u *EnvBuildUpsert) ClearFinishedAt() *EnvBuildUpsert

ClearFinishedAt clears the value of the "finished_at" field.

func (*EnvBuildUpsert) ClearStartCmd

func (u *EnvBuildUpsert) ClearStartCmd() *EnvBuildUpsert

ClearStartCmd clears the value of the "start_cmd" field.

func (*EnvBuildUpsert) ClearTotalDiskSizeMB

func (u *EnvBuildUpsert) ClearTotalDiskSizeMB() *EnvBuildUpsert

ClearTotalDiskSizeMB clears the value of the "total_disk_size_mb" field.

func (*EnvBuildUpsert) SetDockerfile

func (u *EnvBuildUpsert) SetDockerfile(v string) *EnvBuildUpsert

SetDockerfile sets the "dockerfile" field.

func (*EnvBuildUpsert) SetEnvID

func (u *EnvBuildUpsert) SetEnvID(v string) *EnvBuildUpsert

SetEnvID sets the "env_id" field.

func (*EnvBuildUpsert) SetFinishedAt

func (u *EnvBuildUpsert) SetFinishedAt(v time.Time) *EnvBuildUpsert

SetFinishedAt sets the "finished_at" field.

func (*EnvBuildUpsert) SetFirecrackerVersion

func (u *EnvBuildUpsert) SetFirecrackerVersion(v string) *EnvBuildUpsert

SetFirecrackerVersion sets the "firecracker_version" field.

func (*EnvBuildUpsert) SetFreeDiskSizeMB

func (u *EnvBuildUpsert) SetFreeDiskSizeMB(v int64) *EnvBuildUpsert

SetFreeDiskSizeMB sets the "free_disk_size_mb" field.

func (*EnvBuildUpsert) SetKernelVersion

func (u *EnvBuildUpsert) SetKernelVersion(v string) *EnvBuildUpsert

SetKernelVersion sets the "kernel_version" field.

func (*EnvBuildUpsert) SetRAMMB

func (u *EnvBuildUpsert) SetRAMMB(v int64) *EnvBuildUpsert

SetRAMMB sets the "ram_mb" field.

func (*EnvBuildUpsert) SetStartCmd

func (u *EnvBuildUpsert) SetStartCmd(v string) *EnvBuildUpsert

SetStartCmd sets the "start_cmd" field.

func (*EnvBuildUpsert) SetStatus

func (u *EnvBuildUpsert) SetStatus(v envbuild.Status) *EnvBuildUpsert

SetStatus sets the "status" field.

func (*EnvBuildUpsert) SetTotalDiskSizeMB

func (u *EnvBuildUpsert) SetTotalDiskSizeMB(v int64) *EnvBuildUpsert

SetTotalDiskSizeMB sets the "total_disk_size_mb" field.

func (*EnvBuildUpsert) SetUpdatedAt

func (u *EnvBuildUpsert) SetUpdatedAt(v time.Time) *EnvBuildUpsert

SetUpdatedAt sets the "updated_at" field.

func (*EnvBuildUpsert) SetVcpu

func (u *EnvBuildUpsert) SetVcpu(v int64) *EnvBuildUpsert

SetVcpu sets the "vcpu" field.

func (*EnvBuildUpsert) UpdateDockerfile

func (u *EnvBuildUpsert) UpdateDockerfile() *EnvBuildUpsert

UpdateDockerfile sets the "dockerfile" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateEnvID

func (u *EnvBuildUpsert) UpdateEnvID() *EnvBuildUpsert

UpdateEnvID sets the "env_id" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateFinishedAt

func (u *EnvBuildUpsert) UpdateFinishedAt() *EnvBuildUpsert

UpdateFinishedAt sets the "finished_at" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateFirecrackerVersion

func (u *EnvBuildUpsert) UpdateFirecrackerVersion() *EnvBuildUpsert

UpdateFirecrackerVersion sets the "firecracker_version" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateFreeDiskSizeMB

func (u *EnvBuildUpsert) UpdateFreeDiskSizeMB() *EnvBuildUpsert

UpdateFreeDiskSizeMB sets the "free_disk_size_mb" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateKernelVersion

func (u *EnvBuildUpsert) UpdateKernelVersion() *EnvBuildUpsert

UpdateKernelVersion sets the "kernel_version" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateRAMMB

func (u *EnvBuildUpsert) UpdateRAMMB() *EnvBuildUpsert

UpdateRAMMB sets the "ram_mb" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateStartCmd

func (u *EnvBuildUpsert) UpdateStartCmd() *EnvBuildUpsert

UpdateStartCmd sets the "start_cmd" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateStatus

func (u *EnvBuildUpsert) UpdateStatus() *EnvBuildUpsert

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

func (*EnvBuildUpsert) UpdateTotalDiskSizeMB

func (u *EnvBuildUpsert) UpdateTotalDiskSizeMB() *EnvBuildUpsert

UpdateTotalDiskSizeMB sets the "total_disk_size_mb" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateUpdatedAt

func (u *EnvBuildUpsert) UpdateUpdatedAt() *EnvBuildUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*EnvBuildUpsert) UpdateVcpu

func (u *EnvBuildUpsert) UpdateVcpu() *EnvBuildUpsert

UpdateVcpu sets the "vcpu" field to the value that was provided on create.

type EnvBuildUpsertBulk

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

EnvBuildUpsertBulk is the builder for "upsert"-ing a bulk of EnvBuild nodes.

func (*EnvBuildUpsertBulk) AddFreeDiskSizeMB

func (u *EnvBuildUpsertBulk) AddFreeDiskSizeMB(v int64) *EnvBuildUpsertBulk

AddFreeDiskSizeMB adds v to the "free_disk_size_mb" field.

func (*EnvBuildUpsertBulk) AddRAMMB

AddRAMMB adds v to the "ram_mb" field.

func (*EnvBuildUpsertBulk) AddTotalDiskSizeMB

func (u *EnvBuildUpsertBulk) AddTotalDiskSizeMB(v int64) *EnvBuildUpsertBulk

AddTotalDiskSizeMB adds v to the "total_disk_size_mb" field.

func (*EnvBuildUpsertBulk) AddVcpu

AddVcpu adds v to the "vcpu" field.

func (*EnvBuildUpsertBulk) ClearDockerfile

func (u *EnvBuildUpsertBulk) ClearDockerfile() *EnvBuildUpsertBulk

ClearDockerfile clears the value of the "dockerfile" field.

func (*EnvBuildUpsertBulk) ClearEnvID

func (u *EnvBuildUpsertBulk) ClearEnvID() *EnvBuildUpsertBulk

ClearEnvID clears the value of the "env_id" field.

func (*EnvBuildUpsertBulk) ClearFinishedAt

func (u *EnvBuildUpsertBulk) ClearFinishedAt() *EnvBuildUpsertBulk

ClearFinishedAt clears the value of the "finished_at" field.

func (*EnvBuildUpsertBulk) ClearStartCmd

func (u *EnvBuildUpsertBulk) ClearStartCmd() *EnvBuildUpsertBulk

ClearStartCmd clears the value of the "start_cmd" field.

func (*EnvBuildUpsertBulk) ClearTotalDiskSizeMB

func (u *EnvBuildUpsertBulk) ClearTotalDiskSizeMB() *EnvBuildUpsertBulk

ClearTotalDiskSizeMB clears the value of the "total_disk_size_mb" field.

func (*EnvBuildUpsertBulk) DoNothing

func (u *EnvBuildUpsertBulk) DoNothing() *EnvBuildUpsertBulk

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

func (*EnvBuildUpsertBulk) Exec

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

Exec executes the query.

func (*EnvBuildUpsertBulk) ExecX

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

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

func (*EnvBuildUpsertBulk) Ignore

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

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

func (*EnvBuildUpsertBulk) SetDockerfile

func (u *EnvBuildUpsertBulk) SetDockerfile(v string) *EnvBuildUpsertBulk

SetDockerfile sets the "dockerfile" field.

func (*EnvBuildUpsertBulk) SetEnvID

SetEnvID sets the "env_id" field.

func (*EnvBuildUpsertBulk) SetFinishedAt

func (u *EnvBuildUpsertBulk) SetFinishedAt(v time.Time) *EnvBuildUpsertBulk

SetFinishedAt sets the "finished_at" field.

func (*EnvBuildUpsertBulk) SetFirecrackerVersion

func (u *EnvBuildUpsertBulk) SetFirecrackerVersion(v string) *EnvBuildUpsertBulk

SetFirecrackerVersion sets the "firecracker_version" field.

func (*EnvBuildUpsertBulk) SetFreeDiskSizeMB

func (u *EnvBuildUpsertBulk) SetFreeDiskSizeMB(v int64) *EnvBuildUpsertBulk

SetFreeDiskSizeMB sets the "free_disk_size_mb" field.

func (*EnvBuildUpsertBulk) SetKernelVersion

func (u *EnvBuildUpsertBulk) SetKernelVersion(v string) *EnvBuildUpsertBulk

SetKernelVersion sets the "kernel_version" field.

func (*EnvBuildUpsertBulk) SetRAMMB

SetRAMMB sets the "ram_mb" field.

func (*EnvBuildUpsertBulk) SetStartCmd

func (u *EnvBuildUpsertBulk) SetStartCmd(v string) *EnvBuildUpsertBulk

SetStartCmd sets the "start_cmd" field.

func (*EnvBuildUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*EnvBuildUpsertBulk) SetTotalDiskSizeMB

func (u *EnvBuildUpsertBulk) SetTotalDiskSizeMB(v int64) *EnvBuildUpsertBulk

SetTotalDiskSizeMB sets the "total_disk_size_mb" field.

func (*EnvBuildUpsertBulk) SetUpdatedAt

func (u *EnvBuildUpsertBulk) SetUpdatedAt(v time.Time) *EnvBuildUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*EnvBuildUpsertBulk) SetVcpu

SetVcpu sets the "vcpu" field.

func (*EnvBuildUpsertBulk) Update

func (u *EnvBuildUpsertBulk) Update(set func(*EnvBuildUpsert)) *EnvBuildUpsertBulk

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

func (*EnvBuildUpsertBulk) UpdateDockerfile

func (u *EnvBuildUpsertBulk) UpdateDockerfile() *EnvBuildUpsertBulk

UpdateDockerfile sets the "dockerfile" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateEnvID

func (u *EnvBuildUpsertBulk) UpdateEnvID() *EnvBuildUpsertBulk

UpdateEnvID sets the "env_id" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateFinishedAt

func (u *EnvBuildUpsertBulk) UpdateFinishedAt() *EnvBuildUpsertBulk

UpdateFinishedAt sets the "finished_at" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateFirecrackerVersion

func (u *EnvBuildUpsertBulk) UpdateFirecrackerVersion() *EnvBuildUpsertBulk

UpdateFirecrackerVersion sets the "firecracker_version" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateFreeDiskSizeMB

func (u *EnvBuildUpsertBulk) UpdateFreeDiskSizeMB() *EnvBuildUpsertBulk

UpdateFreeDiskSizeMB sets the "free_disk_size_mb" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateKernelVersion

func (u *EnvBuildUpsertBulk) UpdateKernelVersion() *EnvBuildUpsertBulk

UpdateKernelVersion sets the "kernel_version" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateNewValues

func (u *EnvBuildUpsertBulk) UpdateNewValues() *EnvBuildUpsertBulk

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

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

func (*EnvBuildUpsertBulk) UpdateRAMMB

func (u *EnvBuildUpsertBulk) UpdateRAMMB() *EnvBuildUpsertBulk

UpdateRAMMB sets the "ram_mb" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateStartCmd

func (u *EnvBuildUpsertBulk) UpdateStartCmd() *EnvBuildUpsertBulk

UpdateStartCmd sets the "start_cmd" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateStatus

func (u *EnvBuildUpsertBulk) UpdateStatus() *EnvBuildUpsertBulk

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

func (*EnvBuildUpsertBulk) UpdateTotalDiskSizeMB

func (u *EnvBuildUpsertBulk) UpdateTotalDiskSizeMB() *EnvBuildUpsertBulk

UpdateTotalDiskSizeMB sets the "total_disk_size_mb" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateUpdatedAt

func (u *EnvBuildUpsertBulk) UpdateUpdatedAt() *EnvBuildUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*EnvBuildUpsertBulk) UpdateVcpu

func (u *EnvBuildUpsertBulk) UpdateVcpu() *EnvBuildUpsertBulk

UpdateVcpu sets the "vcpu" field to the value that was provided on create.

type EnvBuildUpsertOne

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

EnvBuildUpsertOne is the builder for "upsert"-ing

one EnvBuild node.

func (*EnvBuildUpsertOne) AddFreeDiskSizeMB

func (u *EnvBuildUpsertOne) AddFreeDiskSizeMB(v int64) *EnvBuildUpsertOne

AddFreeDiskSizeMB adds v to the "free_disk_size_mb" field.

func (*EnvBuildUpsertOne) AddRAMMB

func (u *EnvBuildUpsertOne) AddRAMMB(v int64) *EnvBuildUpsertOne

AddRAMMB adds v to the "ram_mb" field.

func (*EnvBuildUpsertOne) AddTotalDiskSizeMB

func (u *EnvBuildUpsertOne) AddTotalDiskSizeMB(v int64) *EnvBuildUpsertOne

AddTotalDiskSizeMB adds v to the "total_disk_size_mb" field.

func (*EnvBuildUpsertOne) AddVcpu

func (u *EnvBuildUpsertOne) AddVcpu(v int64) *EnvBuildUpsertOne

AddVcpu adds v to the "vcpu" field.

func (*EnvBuildUpsertOne) ClearDockerfile

func (u *EnvBuildUpsertOne) ClearDockerfile() *EnvBuildUpsertOne

ClearDockerfile clears the value of the "dockerfile" field.

func (*EnvBuildUpsertOne) ClearEnvID

func (u *EnvBuildUpsertOne) ClearEnvID() *EnvBuildUpsertOne

ClearEnvID clears the value of the "env_id" field.

func (*EnvBuildUpsertOne) ClearFinishedAt

func (u *EnvBuildUpsertOne) ClearFinishedAt() *EnvBuildUpsertOne

ClearFinishedAt clears the value of the "finished_at" field.

func (*EnvBuildUpsertOne) ClearStartCmd

func (u *EnvBuildUpsertOne) ClearStartCmd() *EnvBuildUpsertOne

ClearStartCmd clears the value of the "start_cmd" field.

func (*EnvBuildUpsertOne) ClearTotalDiskSizeMB

func (u *EnvBuildUpsertOne) ClearTotalDiskSizeMB() *EnvBuildUpsertOne

ClearTotalDiskSizeMB clears the value of the "total_disk_size_mb" field.

func (*EnvBuildUpsertOne) DoNothing

func (u *EnvBuildUpsertOne) DoNothing() *EnvBuildUpsertOne

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

func (*EnvBuildUpsertOne) Exec

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

Exec executes the query.

func (*EnvBuildUpsertOne) ExecX

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

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

func (*EnvBuildUpsertOne) ID

func (u *EnvBuildUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

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

func (*EnvBuildUpsertOne) IDX

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

func (*EnvBuildUpsertOne) Ignore

func (u *EnvBuildUpsertOne) Ignore() *EnvBuildUpsertOne

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

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

func (*EnvBuildUpsertOne) SetDockerfile

func (u *EnvBuildUpsertOne) SetDockerfile(v string) *EnvBuildUpsertOne

SetDockerfile sets the "dockerfile" field.

func (*EnvBuildUpsertOne) SetEnvID

func (u *EnvBuildUpsertOne) SetEnvID(v string) *EnvBuildUpsertOne

SetEnvID sets the "env_id" field.

func (*EnvBuildUpsertOne) SetFinishedAt

func (u *EnvBuildUpsertOne) SetFinishedAt(v time.Time) *EnvBuildUpsertOne

SetFinishedAt sets the "finished_at" field.

func (*EnvBuildUpsertOne) SetFirecrackerVersion

func (u *EnvBuildUpsertOne) SetFirecrackerVersion(v string) *EnvBuildUpsertOne

SetFirecrackerVersion sets the "firecracker_version" field.

func (*EnvBuildUpsertOne) SetFreeDiskSizeMB

func (u *EnvBuildUpsertOne) SetFreeDiskSizeMB(v int64) *EnvBuildUpsertOne

SetFreeDiskSizeMB sets the "free_disk_size_mb" field.

func (*EnvBuildUpsertOne) SetKernelVersion

func (u *EnvBuildUpsertOne) SetKernelVersion(v string) *EnvBuildUpsertOne

SetKernelVersion sets the "kernel_version" field.

func (*EnvBuildUpsertOne) SetRAMMB

func (u *EnvBuildUpsertOne) SetRAMMB(v int64) *EnvBuildUpsertOne

SetRAMMB sets the "ram_mb" field.

func (*EnvBuildUpsertOne) SetStartCmd

func (u *EnvBuildUpsertOne) SetStartCmd(v string) *EnvBuildUpsertOne

SetStartCmd sets the "start_cmd" field.

func (*EnvBuildUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*EnvBuildUpsertOne) SetTotalDiskSizeMB

func (u *EnvBuildUpsertOne) SetTotalDiskSizeMB(v int64) *EnvBuildUpsertOne

SetTotalDiskSizeMB sets the "total_disk_size_mb" field.

func (*EnvBuildUpsertOne) SetUpdatedAt

func (u *EnvBuildUpsertOne) SetUpdatedAt(v time.Time) *EnvBuildUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*EnvBuildUpsertOne) SetVcpu

func (u *EnvBuildUpsertOne) SetVcpu(v int64) *EnvBuildUpsertOne

SetVcpu sets the "vcpu" field.

func (*EnvBuildUpsertOne) Update

func (u *EnvBuildUpsertOne) Update(set func(*EnvBuildUpsert)) *EnvBuildUpsertOne

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

func (*EnvBuildUpsertOne) UpdateDockerfile

func (u *EnvBuildUpsertOne) UpdateDockerfile() *EnvBuildUpsertOne

UpdateDockerfile sets the "dockerfile" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateEnvID

func (u *EnvBuildUpsertOne) UpdateEnvID() *EnvBuildUpsertOne

UpdateEnvID sets the "env_id" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateFinishedAt

func (u *EnvBuildUpsertOne) UpdateFinishedAt() *EnvBuildUpsertOne

UpdateFinishedAt sets the "finished_at" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateFirecrackerVersion

func (u *EnvBuildUpsertOne) UpdateFirecrackerVersion() *EnvBuildUpsertOne

UpdateFirecrackerVersion sets the "firecracker_version" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateFreeDiskSizeMB

func (u *EnvBuildUpsertOne) UpdateFreeDiskSizeMB() *EnvBuildUpsertOne

UpdateFreeDiskSizeMB sets the "free_disk_size_mb" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateKernelVersion

func (u *EnvBuildUpsertOne) UpdateKernelVersion() *EnvBuildUpsertOne

UpdateKernelVersion sets the "kernel_version" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateNewValues

func (u *EnvBuildUpsertOne) UpdateNewValues() *EnvBuildUpsertOne

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

func (*EnvBuildUpsertOne) UpdateRAMMB

func (u *EnvBuildUpsertOne) UpdateRAMMB() *EnvBuildUpsertOne

UpdateRAMMB sets the "ram_mb" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateStartCmd

func (u *EnvBuildUpsertOne) UpdateStartCmd() *EnvBuildUpsertOne

UpdateStartCmd sets the "start_cmd" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateStatus

func (u *EnvBuildUpsertOne) UpdateStatus() *EnvBuildUpsertOne

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

func (*EnvBuildUpsertOne) UpdateTotalDiskSizeMB

func (u *EnvBuildUpsertOne) UpdateTotalDiskSizeMB() *EnvBuildUpsertOne

UpdateTotalDiskSizeMB sets the "total_disk_size_mb" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateUpdatedAt

func (u *EnvBuildUpsertOne) UpdateUpdatedAt() *EnvBuildUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*EnvBuildUpsertOne) UpdateVcpu

func (u *EnvBuildUpsertOne) UpdateVcpu() *EnvBuildUpsertOne

UpdateVcpu sets the "vcpu" field to the value that was provided on create.

type EnvBuilds

type EnvBuilds []*EnvBuild

EnvBuilds is a parsable slice of EnvBuild.

type EnvClient

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

EnvClient is a client for the Env schema.

func NewEnvClient

func NewEnvClient(c config) *EnvClient

NewEnvClient returns a client for the Env from the given config.

func (*EnvClient) Create

func (c *EnvClient) Create() *EnvCreate

Create returns a builder for creating a Env entity.

func (*EnvClient) CreateBulk

func (c *EnvClient) CreateBulk(builders ...*EnvCreate) *EnvCreateBulk

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

func (*EnvClient) Delete

func (c *EnvClient) Delete() *EnvDelete

Delete returns a delete builder for Env.

func (*EnvClient) DeleteOne

func (c *EnvClient) DeleteOne(e *Env) *EnvDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EnvClient) DeleteOneID

func (c *EnvClient) DeleteOneID(id string) *EnvDeleteOne

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

func (*EnvClient) Get

func (c *EnvClient) Get(ctx context.Context, id string) (*Env, error)

Get returns a Env entity by its id.

func (*EnvClient) GetX

func (c *EnvClient) GetX(ctx context.Context, id string) *Env

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

func (*EnvClient) Hooks

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

Hooks returns the client hooks.

func (*EnvClient) Intercept

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

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

func (*EnvClient) Interceptors

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

Interceptors returns the client interceptors.

func (*EnvClient) MapCreateBulk

func (c *EnvClient) MapCreateBulk(slice any, setFunc func(*EnvCreate, int)) *EnvCreateBulk

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

func (c *EnvClient) Query() *EnvQuery

Query returns a query builder for Env.

func (*EnvClient) QueryBuilds

func (c *EnvClient) QueryBuilds(e *Env) *EnvBuildQuery

QueryBuilds queries the builds edge of a Env.

func (*EnvClient) QueryEnvAliases

func (c *EnvClient) QueryEnvAliases(e *Env) *EnvAliasQuery

QueryEnvAliases queries the env_aliases edge of a Env.

func (*EnvClient) QueryTeam

func (c *EnvClient) QueryTeam(e *Env) *TeamQuery

QueryTeam queries the team edge of a Env.

func (*EnvClient) Update

func (c *EnvClient) Update() *EnvUpdate

Update returns an update builder for Env.

func (*EnvClient) UpdateOne

func (c *EnvClient) UpdateOne(e *Env) *EnvUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EnvClient) UpdateOneID

func (c *EnvClient) UpdateOneID(id string) *EnvUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EnvClient) Use

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

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

type EnvCreate

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

EnvCreate is the builder for creating a Env entity.

func (*EnvCreate) AddBuildIDs

func (ec *EnvCreate) AddBuildIDs(ids ...uuid.UUID) *EnvCreate

AddBuildIDs adds the "builds" edge to the EnvBuild entity by IDs.

func (*EnvCreate) AddBuilds

func (ec *EnvCreate) AddBuilds(e ...*EnvBuild) *EnvCreate

AddBuilds adds the "builds" edges to the EnvBuild entity.

func (*EnvCreate) AddEnvAliasIDs

func (ec *EnvCreate) AddEnvAliasIDs(ids ...string) *EnvCreate

AddEnvAliasIDs adds the "env_aliases" edge to the EnvAlias entity by IDs.

func (*EnvCreate) AddEnvAliases

func (ec *EnvCreate) AddEnvAliases(e ...*EnvAlias) *EnvCreate

AddEnvAliases adds the "env_aliases" edges to the EnvAlias entity.

func (*EnvCreate) Exec

func (ec *EnvCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvCreate) ExecX

func (ec *EnvCreate) ExecX(ctx context.Context)

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

func (*EnvCreate) Mutation

func (ec *EnvCreate) Mutation() *EnvMutation

Mutation returns the EnvMutation object of the builder.

func (*EnvCreate) OnConflict

func (ec *EnvCreate) OnConflict(opts ...sql.ConflictOption) *EnvUpsertOne

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

client.Env.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EnvUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*EnvCreate) OnConflictColumns

func (ec *EnvCreate) OnConflictColumns(columns ...string) *EnvUpsertOne

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

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

func (*EnvCreate) Save

func (ec *EnvCreate) Save(ctx context.Context) (*Env, error)

Save creates the Env in the database.

func (*EnvCreate) SaveX

func (ec *EnvCreate) SaveX(ctx context.Context) *Env

SaveX calls Save and panics if Save returns an error.

func (*EnvCreate) SetBuildCount

func (ec *EnvCreate) SetBuildCount(i int32) *EnvCreate

SetBuildCount sets the "build_count" field.

func (*EnvCreate) SetCreatedAt

func (ec *EnvCreate) SetCreatedAt(t time.Time) *EnvCreate

SetCreatedAt sets the "created_at" field.

func (*EnvCreate) SetID

func (ec *EnvCreate) SetID(s string) *EnvCreate

SetID sets the "id" field.

func (*EnvCreate) SetLastSpawnedAt

func (ec *EnvCreate) SetLastSpawnedAt(t time.Time) *EnvCreate

SetLastSpawnedAt sets the "last_spawned_at" field.

func (*EnvCreate) SetNillableBuildCount

func (ec *EnvCreate) SetNillableBuildCount(i *int32) *EnvCreate

SetNillableBuildCount sets the "build_count" field if the given value is not nil.

func (*EnvCreate) SetNillableCreatedAt

func (ec *EnvCreate) SetNillableCreatedAt(t *time.Time) *EnvCreate

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

func (*EnvCreate) SetNillableLastSpawnedAt

func (ec *EnvCreate) SetNillableLastSpawnedAt(t *time.Time) *EnvCreate

SetNillableLastSpawnedAt sets the "last_spawned_at" field if the given value is not nil.

func (*EnvCreate) SetNillableSpawnCount

func (ec *EnvCreate) SetNillableSpawnCount(i *int64) *EnvCreate

SetNillableSpawnCount sets the "spawn_count" field if the given value is not nil.

func (*EnvCreate) SetNillableUpdatedAt

func (ec *EnvCreate) SetNillableUpdatedAt(t *time.Time) *EnvCreate

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

func (*EnvCreate) SetPublic

func (ec *EnvCreate) SetPublic(b bool) *EnvCreate

SetPublic sets the "public" field.

func (*EnvCreate) SetSpawnCount

func (ec *EnvCreate) SetSpawnCount(i int64) *EnvCreate

SetSpawnCount sets the "spawn_count" field.

func (*EnvCreate) SetTeam

func (ec *EnvCreate) SetTeam(t *Team) *EnvCreate

SetTeam sets the "team" edge to the Team entity.

func (*EnvCreate) SetTeamID

func (ec *EnvCreate) SetTeamID(u uuid.UUID) *EnvCreate

SetTeamID sets the "team_id" field.

func (*EnvCreate) SetUpdatedAt

func (ec *EnvCreate) SetUpdatedAt(t time.Time) *EnvCreate

SetUpdatedAt sets the "updated_at" field.

type EnvCreateBulk

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

EnvCreateBulk is the builder for creating many Env entities in bulk.

func (*EnvCreateBulk) Exec

func (ecb *EnvCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvCreateBulk) ExecX

func (ecb *EnvCreateBulk) ExecX(ctx context.Context)

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

func (*EnvCreateBulk) OnConflict

func (ecb *EnvCreateBulk) OnConflict(opts ...sql.ConflictOption) *EnvUpsertBulk

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

client.Env.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.EnvUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*EnvCreateBulk) OnConflictColumns

func (ecb *EnvCreateBulk) OnConflictColumns(columns ...string) *EnvUpsertBulk

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

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

func (*EnvCreateBulk) Save

func (ecb *EnvCreateBulk) Save(ctx context.Context) ([]*Env, error)

Save creates the Env entities in the database.

func (*EnvCreateBulk) SaveX

func (ecb *EnvCreateBulk) SaveX(ctx context.Context) []*Env

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

type EnvDelete

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

EnvDelete is the builder for deleting a Env entity.

func (*EnvDelete) Exec

func (ed *EnvDelete) Exec(ctx context.Context) (int, error)

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

func (*EnvDelete) ExecX

func (ed *EnvDelete) ExecX(ctx context.Context) int

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

func (*EnvDelete) Where

func (ed *EnvDelete) Where(ps ...predicate.Env) *EnvDelete

Where appends a list predicates to the EnvDelete builder.

type EnvDeleteOne

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

EnvDeleteOne is the builder for deleting a single Env entity.

func (*EnvDeleteOne) Exec

func (edo *EnvDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EnvDeleteOne) ExecX

func (edo *EnvDeleteOne) ExecX(ctx context.Context)

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

func (*EnvDeleteOne) Where

func (edo *EnvDeleteOne) Where(ps ...predicate.Env) *EnvDeleteOne

Where appends a list predicates to the EnvDelete builder.

type EnvEdges

type EnvEdges struct {
	// Team holds the value of the team edge.
	Team *Team `json:"team,omitempty"`
	// EnvAliases holds the value of the env_aliases edge.
	EnvAliases []*EnvAlias `json:"env_aliases,omitempty"`
	// Builds holds the value of the builds edge.
	Builds []*EnvBuild `json:"builds,omitempty"`
	// contains filtered or unexported fields
}

EnvEdges holds the relations/edges for other nodes in the graph.

func (EnvEdges) BuildsOrErr

func (e EnvEdges) BuildsOrErr() ([]*EnvBuild, error)

BuildsOrErr returns the Builds value or an error if the edge was not loaded in eager-loading.

func (EnvEdges) EnvAliasesOrErr

func (e EnvEdges) EnvAliasesOrErr() ([]*EnvAlias, error)

EnvAliasesOrErr returns the EnvAliases value or an error if the edge was not loaded in eager-loading.

func (EnvEdges) TeamOrErr

func (e EnvEdges) TeamOrErr() (*Team, error)

TeamOrErr returns the Team value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EnvGroupBy

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

EnvGroupBy is the group-by builder for Env entities.

func (*EnvGroupBy) Aggregate

func (egb *EnvGroupBy) Aggregate(fns ...AggregateFunc) *EnvGroupBy

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

func (*EnvGroupBy) Bool

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

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

func (*EnvGroupBy) BoolX

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

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

func (*EnvGroupBy) Bools

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

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

func (*EnvGroupBy) BoolsX

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

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

func (*EnvGroupBy) Float64

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

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

func (*EnvGroupBy) Float64X

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

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

func (*EnvGroupBy) Float64s

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

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

func (*EnvGroupBy) Float64sX

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

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

func (*EnvGroupBy) Int

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

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

func (*EnvGroupBy) IntX

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

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

func (*EnvGroupBy) Ints

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

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

func (*EnvGroupBy) IntsX

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

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

func (*EnvGroupBy) Scan

func (egb *EnvGroupBy) Scan(ctx context.Context, v any) error

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

func (*EnvGroupBy) ScanX

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

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

func (*EnvGroupBy) String

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

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

func (*EnvGroupBy) StringX

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

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

func (*EnvGroupBy) Strings

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

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

func (*EnvGroupBy) StringsX

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

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

type EnvMutation

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

EnvMutation represents an operation that mutates the Env nodes in the graph.

func (*EnvMutation) AddBuildCount

func (m *EnvMutation) AddBuildCount(i int32)

AddBuildCount adds i to the "build_count" field.

func (*EnvMutation) AddBuildIDs

func (m *EnvMutation) AddBuildIDs(ids ...uuid.UUID)

AddBuildIDs adds the "builds" edge to the EnvBuild entity by ids.

func (*EnvMutation) AddEnvAliasIDs

func (m *EnvMutation) AddEnvAliasIDs(ids ...string)

AddEnvAliasIDs adds the "env_aliases" edge to the EnvAlias entity by ids.

func (*EnvMutation) AddField

func (m *EnvMutation) 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 (*EnvMutation) AddSpawnCount

func (m *EnvMutation) AddSpawnCount(i int64)

AddSpawnCount adds i to the "spawn_count" field.

func (*EnvMutation) AddedBuildCount

func (m *EnvMutation) AddedBuildCount() (r int32, exists bool)

AddedBuildCount returns the value that was added to the "build_count" field in this mutation.

func (*EnvMutation) AddedEdges

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

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

func (*EnvMutation) AddedField

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

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

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

func (*EnvMutation) AddedIDs

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

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

func (*EnvMutation) AddedSpawnCount

func (m *EnvMutation) AddedSpawnCount() (r int64, exists bool)

AddedSpawnCount returns the value that was added to the "spawn_count" field in this mutation.

func (*EnvMutation) BuildCount

func (m *EnvMutation) BuildCount() (r int32, exists bool)

BuildCount returns the value of the "build_count" field in the mutation.

func (*EnvMutation) BuildsCleared

func (m *EnvMutation) BuildsCleared() bool

BuildsCleared reports if the "builds" edge to the EnvBuild entity was cleared.

func (*EnvMutation) BuildsIDs

func (m *EnvMutation) BuildsIDs() (ids []uuid.UUID)

BuildsIDs returns the "builds" edge IDs in the mutation.

func (*EnvMutation) ClearBuilds

func (m *EnvMutation) ClearBuilds()

ClearBuilds clears the "builds" edge to the EnvBuild entity.

func (*EnvMutation) ClearEdge

func (m *EnvMutation) 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 (*EnvMutation) ClearEnvAliases

func (m *EnvMutation) ClearEnvAliases()

ClearEnvAliases clears the "env_aliases" edge to the EnvAlias entity.

func (*EnvMutation) ClearField

func (m *EnvMutation) 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 (*EnvMutation) ClearLastSpawnedAt

func (m *EnvMutation) ClearLastSpawnedAt()

ClearLastSpawnedAt clears the value of the "last_spawned_at" field.

func (*EnvMutation) ClearTeam

func (m *EnvMutation) ClearTeam()

ClearTeam clears the "team" edge to the Team entity.

func (*EnvMutation) ClearedEdges

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

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

func (*EnvMutation) ClearedFields

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

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

func (EnvMutation) Client

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

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

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

func (*EnvMutation) EdgeCleared

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

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

func (*EnvMutation) EnvAliasesCleared

func (m *EnvMutation) EnvAliasesCleared() bool

EnvAliasesCleared reports if the "env_aliases" edge to the EnvAlias entity was cleared.

func (*EnvMutation) EnvAliasesIDs

func (m *EnvMutation) EnvAliasesIDs() (ids []string)

EnvAliasesIDs returns the "env_aliases" edge IDs in the mutation.

func (*EnvMutation) Field

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

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

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

func (*EnvMutation) Fields

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

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

func (m *EnvMutation) 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 (*EnvMutation) LastSpawnedAt

func (m *EnvMutation) LastSpawnedAt() (r time.Time, exists bool)

LastSpawnedAt returns the value of the "last_spawned_at" field in the mutation.

func (*EnvMutation) LastSpawnedAtCleared

func (m *EnvMutation) LastSpawnedAtCleared() bool

LastSpawnedAtCleared returns if the "last_spawned_at" field was cleared in this mutation.

func (*EnvMutation) OldBuildCount

func (m *EnvMutation) OldBuildCount(ctx context.Context) (v int32, err error)

OldBuildCount returns the old "build_count" field's value of the Env entity. If the Env 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 (*EnvMutation) OldCreatedAt

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

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

func (m *EnvMutation) 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 (*EnvMutation) OldLastSpawnedAt

func (m *EnvMutation) OldLastSpawnedAt(ctx context.Context) (v time.Time, err error)

OldLastSpawnedAt returns the old "last_spawned_at" field's value of the Env entity. If the Env 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 (*EnvMutation) OldPublic

func (m *EnvMutation) OldPublic(ctx context.Context) (v bool, err error)

OldPublic returns the old "public" field's value of the Env entity. If the Env 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 (*EnvMutation) OldSpawnCount

func (m *EnvMutation) OldSpawnCount(ctx context.Context) (v int64, err error)

OldSpawnCount returns the old "spawn_count" field's value of the Env entity. If the Env 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 (*EnvMutation) OldTeamID

func (m *EnvMutation) OldTeamID(ctx context.Context) (v uuid.UUID, err error)

OldTeamID returns the old "team_id" field's value of the Env entity. If the Env 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 (*EnvMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Env entity. If the Env 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 (*EnvMutation) Op

func (m *EnvMutation) Op() Op

Op returns the operation name.

func (*EnvMutation) Public

func (m *EnvMutation) Public() (r bool, exists bool)

Public returns the value of the "public" field in the mutation.

func (*EnvMutation) RemoveBuildIDs

func (m *EnvMutation) RemoveBuildIDs(ids ...uuid.UUID)

RemoveBuildIDs removes the "builds" edge to the EnvBuild entity by IDs.

func (*EnvMutation) RemoveEnvAliasIDs

func (m *EnvMutation) RemoveEnvAliasIDs(ids ...string)

RemoveEnvAliasIDs removes the "env_aliases" edge to the EnvAlias entity by IDs.

func (*EnvMutation) RemovedBuildsIDs

func (m *EnvMutation) RemovedBuildsIDs() (ids []uuid.UUID)

RemovedBuilds returns the removed IDs of the "builds" edge to the EnvBuild entity.

func (*EnvMutation) RemovedEdges

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

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

func (*EnvMutation) RemovedEnvAliasesIDs

func (m *EnvMutation) RemovedEnvAliasesIDs() (ids []string)

RemovedEnvAliases returns the removed IDs of the "env_aliases" edge to the EnvAlias entity.

func (*EnvMutation) RemovedIDs

func (m *EnvMutation) 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 (*EnvMutation) ResetBuildCount

func (m *EnvMutation) ResetBuildCount()

ResetBuildCount resets all changes to the "build_count" field.

func (*EnvMutation) ResetBuilds

func (m *EnvMutation) ResetBuilds()

ResetBuilds resets all changes to the "builds" edge.

func (*EnvMutation) ResetCreatedAt

func (m *EnvMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EnvMutation) ResetEdge

func (m *EnvMutation) 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 (*EnvMutation) ResetEnvAliases

func (m *EnvMutation) ResetEnvAliases()

ResetEnvAliases resets all changes to the "env_aliases" edge.

func (*EnvMutation) ResetField

func (m *EnvMutation) 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 (*EnvMutation) ResetLastSpawnedAt

func (m *EnvMutation) ResetLastSpawnedAt()

ResetLastSpawnedAt resets all changes to the "last_spawned_at" field.

func (*EnvMutation) ResetPublic

func (m *EnvMutation) ResetPublic()

ResetPublic resets all changes to the "public" field.

func (*EnvMutation) ResetSpawnCount

func (m *EnvMutation) ResetSpawnCount()

ResetSpawnCount resets all changes to the "spawn_count" field.

func (*EnvMutation) ResetTeam

func (m *EnvMutation) ResetTeam()

ResetTeam resets all changes to the "team" edge.

func (*EnvMutation) ResetTeamID

func (m *EnvMutation) ResetTeamID()

ResetTeamID resets all changes to the "team_id" field.

func (*EnvMutation) ResetUpdatedAt

func (m *EnvMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*EnvMutation) SetBuildCount

func (m *EnvMutation) SetBuildCount(i int32)

SetBuildCount sets the "build_count" field.

func (*EnvMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*EnvMutation) SetField

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

func (m *EnvMutation) SetID(id string)

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

func (*EnvMutation) SetLastSpawnedAt

func (m *EnvMutation) SetLastSpawnedAt(t time.Time)

SetLastSpawnedAt sets the "last_spawned_at" field.

func (*EnvMutation) SetOp

func (m *EnvMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EnvMutation) SetPublic

func (m *EnvMutation) SetPublic(b bool)

SetPublic sets the "public" field.

func (*EnvMutation) SetSpawnCount

func (m *EnvMutation) SetSpawnCount(i int64)

SetSpawnCount sets the "spawn_count" field.

func (*EnvMutation) SetTeamID

func (m *EnvMutation) SetTeamID(u uuid.UUID)

SetTeamID sets the "team_id" field.

func (*EnvMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EnvMutation) SpawnCount

func (m *EnvMutation) SpawnCount() (r int64, exists bool)

SpawnCount returns the value of the "spawn_count" field in the mutation.

func (*EnvMutation) TeamCleared

func (m *EnvMutation) TeamCleared() bool

TeamCleared reports if the "team" edge to the Team entity was cleared.

func (*EnvMutation) TeamID

func (m *EnvMutation) TeamID() (r uuid.UUID, exists bool)

TeamID returns the value of the "team_id" field in the mutation.

func (*EnvMutation) TeamIDs

func (m *EnvMutation) TeamIDs() (ids []uuid.UUID)

TeamIDs returns the "team" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TeamID instead. It exists only for internal usage by the builders.

func (EnvMutation) Tx

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

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

func (*EnvMutation) Type

func (m *EnvMutation) Type() string

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

func (*EnvMutation) UpdatedAt

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

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

func (*EnvMutation) Where

func (m *EnvMutation) Where(ps ...predicate.Env)

Where appends a list predicates to the EnvMutation builder.

func (*EnvMutation) WhereP

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

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

type EnvQuery

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

EnvQuery is the builder for querying Env entities.

func (*EnvQuery) Aggregate

func (eq *EnvQuery) Aggregate(fns ...AggregateFunc) *EnvSelect

Aggregate returns a EnvSelect configured with the given aggregations.

func (*EnvQuery) All

func (eq *EnvQuery) All(ctx context.Context) ([]*Env, error)

All executes the query and returns a list of Envs.

func (*EnvQuery) AllX

func (eq *EnvQuery) AllX(ctx context.Context) []*Env

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

func (*EnvQuery) Clone

func (eq *EnvQuery) Clone() *EnvQuery

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

func (*EnvQuery) Count

func (eq *EnvQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EnvQuery) CountX

func (eq *EnvQuery) CountX(ctx context.Context) int

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

func (*EnvQuery) Exist

func (eq *EnvQuery) Exist(ctx context.Context) (bool, error)

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

func (*EnvQuery) ExistX

func (eq *EnvQuery) ExistX(ctx context.Context) bool

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

func (*EnvQuery) First

func (eq *EnvQuery) First(ctx context.Context) (*Env, error)

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

func (*EnvQuery) FirstID

func (eq *EnvQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*EnvQuery) FirstIDX

func (eq *EnvQuery) FirstIDX(ctx context.Context) string

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

func (*EnvQuery) FirstX

func (eq *EnvQuery) FirstX(ctx context.Context) *Env

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

func (*EnvQuery) GroupBy

func (eq *EnvQuery) GroupBy(field string, fields ...string) *EnvGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Env.Query().
	GroupBy(env.FieldCreatedAt).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*EnvQuery) IDs

func (eq *EnvQuery) IDs(ctx context.Context) (ids []string, err error)

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

func (*EnvQuery) IDsX

func (eq *EnvQuery) IDsX(ctx context.Context) []string

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

func (*EnvQuery) Limit

func (eq *EnvQuery) Limit(limit int) *EnvQuery

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

func (*EnvQuery) Modify

func (eq *EnvQuery) Modify(modifiers ...func(s *sql.Selector)) *EnvSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvQuery) Offset

func (eq *EnvQuery) Offset(offset int) *EnvQuery

Offset to start from.

func (*EnvQuery) Only

func (eq *EnvQuery) Only(ctx context.Context) (*Env, error)

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

func (*EnvQuery) OnlyID

func (eq *EnvQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*EnvQuery) OnlyIDX

func (eq *EnvQuery) OnlyIDX(ctx context.Context) string

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

func (*EnvQuery) OnlyX

func (eq *EnvQuery) OnlyX(ctx context.Context) *Env

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

func (*EnvQuery) Order

func (eq *EnvQuery) Order(o ...env.OrderOption) *EnvQuery

Order specifies how the records should be ordered.

func (*EnvQuery) QueryBuilds

func (eq *EnvQuery) QueryBuilds() *EnvBuildQuery

QueryBuilds chains the current query on the "builds" edge.

func (*EnvQuery) QueryEnvAliases

func (eq *EnvQuery) QueryEnvAliases() *EnvAliasQuery

QueryEnvAliases chains the current query on the "env_aliases" edge.

func (*EnvQuery) QueryTeam

func (eq *EnvQuery) QueryTeam() *TeamQuery

QueryTeam chains the current query on the "team" edge.

func (*EnvQuery) Select

func (eq *EnvQuery) Select(fields ...string) *EnvSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Env.Query().
	Select(env.FieldCreatedAt).
	Scan(ctx, &v)

func (*EnvQuery) Unique

func (eq *EnvQuery) Unique(unique bool) *EnvQuery

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

func (eq *EnvQuery) Where(ps ...predicate.Env) *EnvQuery

Where adds a new predicate for the EnvQuery builder.

func (*EnvQuery) WithBuilds

func (eq *EnvQuery) WithBuilds(opts ...func(*EnvBuildQuery)) *EnvQuery

WithBuilds tells the query-builder to eager-load the nodes that are connected to the "builds" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvQuery) WithEnvAliases

func (eq *EnvQuery) WithEnvAliases(opts ...func(*EnvAliasQuery)) *EnvQuery

WithEnvAliases tells the query-builder to eager-load the nodes that are connected to the "env_aliases" edge. The optional arguments are used to configure the query builder of the edge.

func (*EnvQuery) WithTeam

func (eq *EnvQuery) WithTeam(opts ...func(*TeamQuery)) *EnvQuery

WithTeam tells the query-builder to eager-load the nodes that are connected to the "team" edge. The optional arguments are used to configure the query builder of the edge.

type EnvSelect

type EnvSelect struct {
	*EnvQuery
	// contains filtered or unexported fields
}

EnvSelect is the builder for selecting fields of Env entities.

func (*EnvSelect) Aggregate

func (es *EnvSelect) Aggregate(fns ...AggregateFunc) *EnvSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EnvSelect) Bool

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

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

func (*EnvSelect) BoolX

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

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

func (*EnvSelect) Bools

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

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

func (*EnvSelect) BoolsX

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

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

func (*EnvSelect) Float64

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

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

func (*EnvSelect) Float64X

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

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

func (*EnvSelect) Float64s

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

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

func (*EnvSelect) Float64sX

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

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

func (*EnvSelect) Int

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

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

func (*EnvSelect) IntX

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

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

func (*EnvSelect) Ints

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

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

func (*EnvSelect) IntsX

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

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

func (*EnvSelect) Modify

func (es *EnvSelect) Modify(modifiers ...func(s *sql.Selector)) *EnvSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*EnvSelect) Scan

func (es *EnvSelect) Scan(ctx context.Context, v any) error

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

func (*EnvSelect) ScanX

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

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

func (*EnvSelect) String

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

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

func (*EnvSelect) StringX

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

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

func (*EnvSelect) Strings

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

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

func (*EnvSelect) StringsX

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

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

type EnvUpdate

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

EnvUpdate is the builder for updating Env entities.

func (*EnvUpdate) AddBuildCount

func (eu *EnvUpdate) AddBuildCount(i int32) *EnvUpdate

AddBuildCount adds i to the "build_count" field.

func (*EnvUpdate) AddBuildIDs

func (eu *EnvUpdate) AddBuildIDs(ids ...uuid.UUID) *EnvUpdate

AddBuildIDs adds the "builds" edge to the EnvBuild entity by IDs.

func (*EnvUpdate) AddBuilds

func (eu *EnvUpdate) AddBuilds(e ...*EnvBuild) *EnvUpdate

AddBuilds adds the "builds" edges to the EnvBuild entity.

func (*EnvUpdate) AddEnvAliasIDs

func (eu *EnvUpdate) AddEnvAliasIDs(ids ...string) *EnvUpdate

AddEnvAliasIDs adds the "env_aliases" edge to the EnvAlias entity by IDs.

func (*EnvUpdate) AddEnvAliases

func (eu *EnvUpdate) AddEnvAliases(e ...*EnvAlias) *EnvUpdate

AddEnvAliases adds the "env_aliases" edges to the EnvAlias entity.

func (*EnvUpdate) AddSpawnCount

func (eu *EnvUpdate) AddSpawnCount(i int64) *EnvUpdate

AddSpawnCount adds i to the "spawn_count" field.

func (*EnvUpdate) ClearBuilds

func (eu *EnvUpdate) ClearBuilds() *EnvUpdate

ClearBuilds clears all "builds" edges to the EnvBuild entity.

func (*EnvUpdate) ClearEnvAliases

func (eu *EnvUpdate) ClearEnvAliases() *EnvUpdate

ClearEnvAliases clears all "env_aliases" edges to the EnvAlias entity.

func (*EnvUpdate) ClearLastSpawnedAt

func (eu *EnvUpdate) ClearLastSpawnedAt() *EnvUpdate

ClearLastSpawnedAt clears the value of the "last_spawned_at" field.

func (*EnvUpdate) ClearTeam

func (eu *EnvUpdate) ClearTeam() *EnvUpdate

ClearTeam clears the "team" edge to the Team entity.

func (*EnvUpdate) Exec

func (eu *EnvUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EnvUpdate) ExecX

func (eu *EnvUpdate) ExecX(ctx context.Context)

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

func (*EnvUpdate) Modify

func (eu *EnvUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvUpdate) Mutation

func (eu *EnvUpdate) Mutation() *EnvMutation

Mutation returns the EnvMutation object of the builder.

func (*EnvUpdate) RemoveBuildIDs

func (eu *EnvUpdate) RemoveBuildIDs(ids ...uuid.UUID) *EnvUpdate

RemoveBuildIDs removes the "builds" edge to EnvBuild entities by IDs.

func (*EnvUpdate) RemoveBuilds

func (eu *EnvUpdate) RemoveBuilds(e ...*EnvBuild) *EnvUpdate

RemoveBuilds removes "builds" edges to EnvBuild entities.

func (*EnvUpdate) RemoveEnvAliasIDs

func (eu *EnvUpdate) RemoveEnvAliasIDs(ids ...string) *EnvUpdate

RemoveEnvAliasIDs removes the "env_aliases" edge to EnvAlias entities by IDs.

func (*EnvUpdate) RemoveEnvAliases

func (eu *EnvUpdate) RemoveEnvAliases(e ...*EnvAlias) *EnvUpdate

RemoveEnvAliases removes "env_aliases" edges to EnvAlias entities.

func (*EnvUpdate) Save

func (eu *EnvUpdate) Save(ctx context.Context) (int, error)

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

func (*EnvUpdate) SaveX

func (eu *EnvUpdate) SaveX(ctx context.Context) int

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

func (*EnvUpdate) SetBuildCount

func (eu *EnvUpdate) SetBuildCount(i int32) *EnvUpdate

SetBuildCount sets the "build_count" field.

func (*EnvUpdate) SetLastSpawnedAt

func (eu *EnvUpdate) SetLastSpawnedAt(t time.Time) *EnvUpdate

SetLastSpawnedAt sets the "last_spawned_at" field.

func (*EnvUpdate) SetNillableBuildCount

func (eu *EnvUpdate) SetNillableBuildCount(i *int32) *EnvUpdate

SetNillableBuildCount sets the "build_count" field if the given value is not nil.

func (*EnvUpdate) SetNillableLastSpawnedAt

func (eu *EnvUpdate) SetNillableLastSpawnedAt(t *time.Time) *EnvUpdate

SetNillableLastSpawnedAt sets the "last_spawned_at" field if the given value is not nil.

func (*EnvUpdate) SetNillablePublic

func (eu *EnvUpdate) SetNillablePublic(b *bool) *EnvUpdate

SetNillablePublic sets the "public" field if the given value is not nil.

func (*EnvUpdate) SetNillableSpawnCount

func (eu *EnvUpdate) SetNillableSpawnCount(i *int64) *EnvUpdate

SetNillableSpawnCount sets the "spawn_count" field if the given value is not nil.

func (*EnvUpdate) SetNillableTeamID

func (eu *EnvUpdate) SetNillableTeamID(u *uuid.UUID) *EnvUpdate

SetNillableTeamID sets the "team_id" field if the given value is not nil.

func (*EnvUpdate) SetNillableUpdatedAt

func (eu *EnvUpdate) SetNillableUpdatedAt(t *time.Time) *EnvUpdate

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

func (*EnvUpdate) SetPublic

func (eu *EnvUpdate) SetPublic(b bool) *EnvUpdate

SetPublic sets the "public" field.

func (*EnvUpdate) SetSpawnCount

func (eu *EnvUpdate) SetSpawnCount(i int64) *EnvUpdate

SetSpawnCount sets the "spawn_count" field.

func (*EnvUpdate) SetTeam

func (eu *EnvUpdate) SetTeam(t *Team) *EnvUpdate

SetTeam sets the "team" edge to the Team entity.

func (*EnvUpdate) SetTeamID

func (eu *EnvUpdate) SetTeamID(u uuid.UUID) *EnvUpdate

SetTeamID sets the "team_id" field.

func (*EnvUpdate) SetUpdatedAt

func (eu *EnvUpdate) SetUpdatedAt(t time.Time) *EnvUpdate

SetUpdatedAt sets the "updated_at" field.

func (*EnvUpdate) Where

func (eu *EnvUpdate) Where(ps ...predicate.Env) *EnvUpdate

Where appends a list predicates to the EnvUpdate builder.

type EnvUpdateOne

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

EnvUpdateOne is the builder for updating a single Env entity.

func (*EnvUpdateOne) AddBuildCount

func (euo *EnvUpdateOne) AddBuildCount(i int32) *EnvUpdateOne

AddBuildCount adds i to the "build_count" field.

func (*EnvUpdateOne) AddBuildIDs

func (euo *EnvUpdateOne) AddBuildIDs(ids ...uuid.UUID) *EnvUpdateOne

AddBuildIDs adds the "builds" edge to the EnvBuild entity by IDs.

func (*EnvUpdateOne) AddBuilds

func (euo *EnvUpdateOne) AddBuilds(e ...*EnvBuild) *EnvUpdateOne

AddBuilds adds the "builds" edges to the EnvBuild entity.

func (*EnvUpdateOne) AddEnvAliasIDs

func (euo *EnvUpdateOne) AddEnvAliasIDs(ids ...string) *EnvUpdateOne

AddEnvAliasIDs adds the "env_aliases" edge to the EnvAlias entity by IDs.

func (*EnvUpdateOne) AddEnvAliases

func (euo *EnvUpdateOne) AddEnvAliases(e ...*EnvAlias) *EnvUpdateOne

AddEnvAliases adds the "env_aliases" edges to the EnvAlias entity.

func (*EnvUpdateOne) AddSpawnCount

func (euo *EnvUpdateOne) AddSpawnCount(i int64) *EnvUpdateOne

AddSpawnCount adds i to the "spawn_count" field.

func (*EnvUpdateOne) ClearBuilds

func (euo *EnvUpdateOne) ClearBuilds() *EnvUpdateOne

ClearBuilds clears all "builds" edges to the EnvBuild entity.

func (*EnvUpdateOne) ClearEnvAliases

func (euo *EnvUpdateOne) ClearEnvAliases() *EnvUpdateOne

ClearEnvAliases clears all "env_aliases" edges to the EnvAlias entity.

func (*EnvUpdateOne) ClearLastSpawnedAt

func (euo *EnvUpdateOne) ClearLastSpawnedAt() *EnvUpdateOne

ClearLastSpawnedAt clears the value of the "last_spawned_at" field.

func (*EnvUpdateOne) ClearTeam

func (euo *EnvUpdateOne) ClearTeam() *EnvUpdateOne

ClearTeam clears the "team" edge to the Team entity.

func (*EnvUpdateOne) Exec

func (euo *EnvUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EnvUpdateOne) ExecX

func (euo *EnvUpdateOne) ExecX(ctx context.Context)

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

func (*EnvUpdateOne) Modify

func (euo *EnvUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *EnvUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*EnvUpdateOne) Mutation

func (euo *EnvUpdateOne) Mutation() *EnvMutation

Mutation returns the EnvMutation object of the builder.

func (*EnvUpdateOne) RemoveBuildIDs

func (euo *EnvUpdateOne) RemoveBuildIDs(ids ...uuid.UUID) *EnvUpdateOne

RemoveBuildIDs removes the "builds" edge to EnvBuild entities by IDs.

func (*EnvUpdateOne) RemoveBuilds

func (euo *EnvUpdateOne) RemoveBuilds(e ...*EnvBuild) *EnvUpdateOne

RemoveBuilds removes "builds" edges to EnvBuild entities.

func (*EnvUpdateOne) RemoveEnvAliasIDs

func (euo *EnvUpdateOne) RemoveEnvAliasIDs(ids ...string) *EnvUpdateOne

RemoveEnvAliasIDs removes the "env_aliases" edge to EnvAlias entities by IDs.

func (*EnvUpdateOne) RemoveEnvAliases

func (euo *EnvUpdateOne) RemoveEnvAliases(e ...*EnvAlias) *EnvUpdateOne

RemoveEnvAliases removes "env_aliases" edges to EnvAlias entities.

func (*EnvUpdateOne) Save

func (euo *EnvUpdateOne) Save(ctx context.Context) (*Env, error)

Save executes the query and returns the updated Env entity.

func (*EnvUpdateOne) SaveX

func (euo *EnvUpdateOne) SaveX(ctx context.Context) *Env

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

func (*EnvUpdateOne) Select

func (euo *EnvUpdateOne) Select(field string, fields ...string) *EnvUpdateOne

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

func (*EnvUpdateOne) SetBuildCount

func (euo *EnvUpdateOne) SetBuildCount(i int32) *EnvUpdateOne

SetBuildCount sets the "build_count" field.

func (*EnvUpdateOne) SetLastSpawnedAt

func (euo *EnvUpdateOne) SetLastSpawnedAt(t time.Time) *EnvUpdateOne

SetLastSpawnedAt sets the "last_spawned_at" field.

func (*EnvUpdateOne) SetNillableBuildCount

func (euo *EnvUpdateOne) SetNillableBuildCount(i *int32) *EnvUpdateOne

SetNillableBuildCount sets the "build_count" field if the given value is not nil.

func (*EnvUpdateOne) SetNillableLastSpawnedAt

func (euo *EnvUpdateOne) SetNillableLastSpawnedAt(t *time.Time) *EnvUpdateOne

SetNillableLastSpawnedAt sets the "last_spawned_at" field if the given value is not nil.

func (*EnvUpdateOne) SetNillablePublic

func (euo *EnvUpdateOne) SetNillablePublic(b *bool) *EnvUpdateOne

SetNillablePublic sets the "public" field if the given value is not nil.

func (*EnvUpdateOne) SetNillableSpawnCount

func (euo *EnvUpdateOne) SetNillableSpawnCount(i *int64) *EnvUpdateOne

SetNillableSpawnCount sets the "spawn_count" field if the given value is not nil.

func (*EnvUpdateOne) SetNillableTeamID

func (euo *EnvUpdateOne) SetNillableTeamID(u *uuid.UUID) *EnvUpdateOne

SetNillableTeamID sets the "team_id" field if the given value is not nil.

func (*EnvUpdateOne) SetNillableUpdatedAt

func (euo *EnvUpdateOne) SetNillableUpdatedAt(t *time.Time) *EnvUpdateOne

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

func (*EnvUpdateOne) SetPublic

func (euo *EnvUpdateOne) SetPublic(b bool) *EnvUpdateOne

SetPublic sets the "public" field.

func (*EnvUpdateOne) SetSpawnCount

func (euo *EnvUpdateOne) SetSpawnCount(i int64) *EnvUpdateOne

SetSpawnCount sets the "spawn_count" field.

func (*EnvUpdateOne) SetTeam

func (euo *EnvUpdateOne) SetTeam(t *Team) *EnvUpdateOne

SetTeam sets the "team" edge to the Team entity.

func (*EnvUpdateOne) SetTeamID

func (euo *EnvUpdateOne) SetTeamID(u uuid.UUID) *EnvUpdateOne

SetTeamID sets the "team_id" field.

func (*EnvUpdateOne) SetUpdatedAt

func (euo *EnvUpdateOne) SetUpdatedAt(t time.Time) *EnvUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*EnvUpdateOne) Where

func (euo *EnvUpdateOne) Where(ps ...predicate.Env) *EnvUpdateOne

Where appends a list predicates to the EnvUpdate builder.

type EnvUpsert

type EnvUpsert struct {
	*sql.UpdateSet
}

EnvUpsert is the "OnConflict" setter.

func (*EnvUpsert) AddBuildCount

func (u *EnvUpsert) AddBuildCount(v int32) *EnvUpsert

AddBuildCount adds v to the "build_count" field.

func (*EnvUpsert) AddSpawnCount

func (u *EnvUpsert) AddSpawnCount(v int64) *EnvUpsert

AddSpawnCount adds v to the "spawn_count" field.

func (*EnvUpsert) ClearLastSpawnedAt

func (u *EnvUpsert) ClearLastSpawnedAt() *EnvUpsert

ClearLastSpawnedAt clears the value of the "last_spawned_at" field.

func (*EnvUpsert) SetBuildCount

func (u *EnvUpsert) SetBuildCount(v int32) *EnvUpsert

SetBuildCount sets the "build_count" field.

func (*EnvUpsert) SetLastSpawnedAt

func (u *EnvUpsert) SetLastSpawnedAt(v time.Time) *EnvUpsert

SetLastSpawnedAt sets the "last_spawned_at" field.

func (*EnvUpsert) SetPublic

func (u *EnvUpsert) SetPublic(v bool) *EnvUpsert

SetPublic sets the "public" field.

func (*EnvUpsert) SetSpawnCount

func (u *EnvUpsert) SetSpawnCount(v int64) *EnvUpsert

SetSpawnCount sets the "spawn_count" field.

func (*EnvUpsert) SetTeamID

func (u *EnvUpsert) SetTeamID(v uuid.UUID) *EnvUpsert

SetTeamID sets the "team_id" field.

func (*EnvUpsert) SetUpdatedAt

func (u *EnvUpsert) SetUpdatedAt(v time.Time) *EnvUpsert

SetUpdatedAt sets the "updated_at" field.

func (*EnvUpsert) UpdateBuildCount

func (u *EnvUpsert) UpdateBuildCount() *EnvUpsert

UpdateBuildCount sets the "build_count" field to the value that was provided on create.

func (*EnvUpsert) UpdateLastSpawnedAt

func (u *EnvUpsert) UpdateLastSpawnedAt() *EnvUpsert

UpdateLastSpawnedAt sets the "last_spawned_at" field to the value that was provided on create.

func (*EnvUpsert) UpdatePublic

func (u *EnvUpsert) UpdatePublic() *EnvUpsert

UpdatePublic sets the "public" field to the value that was provided on create.

func (*EnvUpsert) UpdateSpawnCount

func (u *EnvUpsert) UpdateSpawnCount() *EnvUpsert

UpdateSpawnCount sets the "spawn_count" field to the value that was provided on create.

func (*EnvUpsert) UpdateTeamID

func (u *EnvUpsert) UpdateTeamID() *EnvUpsert

UpdateTeamID sets the "team_id" field to the value that was provided on create.

func (*EnvUpsert) UpdateUpdatedAt

func (u *EnvUpsert) UpdateUpdatedAt() *EnvUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type EnvUpsertBulk

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

EnvUpsertBulk is the builder for "upsert"-ing a bulk of Env nodes.

func (*EnvUpsertBulk) AddBuildCount

func (u *EnvUpsertBulk) AddBuildCount(v int32) *EnvUpsertBulk

AddBuildCount adds v to the "build_count" field.

func (*EnvUpsertBulk) AddSpawnCount

func (u *EnvUpsertBulk) AddSpawnCount(v int64) *EnvUpsertBulk

AddSpawnCount adds v to the "spawn_count" field.

func (*EnvUpsertBulk) ClearLastSpawnedAt

func (u *EnvUpsertBulk) ClearLastSpawnedAt() *EnvUpsertBulk

ClearLastSpawnedAt clears the value of the "last_spawned_at" field.

func (*EnvUpsertBulk) DoNothing

func (u *EnvUpsertBulk) DoNothing() *EnvUpsertBulk

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

func (*EnvUpsertBulk) Exec

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

Exec executes the query.

func (*EnvUpsertBulk) ExecX

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

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

func (*EnvUpsertBulk) Ignore

func (u *EnvUpsertBulk) Ignore() *EnvUpsertBulk

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

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

func (*EnvUpsertBulk) SetBuildCount

func (u *EnvUpsertBulk) SetBuildCount(v int32) *EnvUpsertBulk

SetBuildCount sets the "build_count" field.

func (*EnvUpsertBulk) SetLastSpawnedAt

func (u *EnvUpsertBulk) SetLastSpawnedAt(v time.Time) *EnvUpsertBulk

SetLastSpawnedAt sets the "last_spawned_at" field.

func (*EnvUpsertBulk) SetPublic

func (u *EnvUpsertBulk) SetPublic(v bool) *EnvUpsertBulk

SetPublic sets the "public" field.

func (*EnvUpsertBulk) SetSpawnCount

func (u *EnvUpsertBulk) SetSpawnCount(v int64) *EnvUpsertBulk

SetSpawnCount sets the "spawn_count" field.

func (*EnvUpsertBulk) SetTeamID

func (u *EnvUpsertBulk) SetTeamID(v uuid.UUID) *EnvUpsertBulk

SetTeamID sets the "team_id" field.

func (*EnvUpsertBulk) SetUpdatedAt

func (u *EnvUpsertBulk) SetUpdatedAt(v time.Time) *EnvUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*EnvUpsertBulk) Update

func (u *EnvUpsertBulk) Update(set func(*EnvUpsert)) *EnvUpsertBulk

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

func (*EnvUpsertBulk) UpdateBuildCount

func (u *EnvUpsertBulk) UpdateBuildCount() *EnvUpsertBulk

UpdateBuildCount sets the "build_count" field to the value that was provided on create.

func (*EnvUpsertBulk) UpdateLastSpawnedAt

func (u *EnvUpsertBulk) UpdateLastSpawnedAt() *EnvUpsertBulk

UpdateLastSpawnedAt sets the "last_spawned_at" field to the value that was provided on create.

func (*EnvUpsertBulk) UpdateNewValues

func (u *EnvUpsertBulk) UpdateNewValues() *EnvUpsertBulk

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

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

func (*EnvUpsertBulk) UpdatePublic

func (u *EnvUpsertBulk) UpdatePublic() *EnvUpsertBulk

UpdatePublic sets the "public" field to the value that was provided on create.

func (*EnvUpsertBulk) UpdateSpawnCount

func (u *EnvUpsertBulk) UpdateSpawnCount() *EnvUpsertBulk

UpdateSpawnCount sets the "spawn_count" field to the value that was provided on create.

func (*EnvUpsertBulk) UpdateTeamID

func (u *EnvUpsertBulk) UpdateTeamID() *EnvUpsertBulk

UpdateTeamID sets the "team_id" field to the value that was provided on create.

func (*EnvUpsertBulk) UpdateUpdatedAt

func (u *EnvUpsertBulk) UpdateUpdatedAt() *EnvUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type EnvUpsertOne

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

EnvUpsertOne is the builder for "upsert"-ing

one Env node.

func (*EnvUpsertOne) AddBuildCount

func (u *EnvUpsertOne) AddBuildCount(v int32) *EnvUpsertOne

AddBuildCount adds v to the "build_count" field.

func (*EnvUpsertOne) AddSpawnCount

func (u *EnvUpsertOne) AddSpawnCount(v int64) *EnvUpsertOne

AddSpawnCount adds v to the "spawn_count" field.

func (*EnvUpsertOne) ClearLastSpawnedAt

func (u *EnvUpsertOne) ClearLastSpawnedAt() *EnvUpsertOne

ClearLastSpawnedAt clears the value of the "last_spawned_at" field.

func (*EnvUpsertOne) DoNothing

func (u *EnvUpsertOne) DoNothing() *EnvUpsertOne

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

func (*EnvUpsertOne) Exec

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

Exec executes the query.

func (*EnvUpsertOne) ExecX

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

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

func (*EnvUpsertOne) ID

func (u *EnvUpsertOne) ID(ctx context.Context) (id string, err error)

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

func (*EnvUpsertOne) IDX

func (u *EnvUpsertOne) IDX(ctx context.Context) string

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

func (*EnvUpsertOne) Ignore

func (u *EnvUpsertOne) Ignore() *EnvUpsertOne

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

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

func (*EnvUpsertOne) SetBuildCount

func (u *EnvUpsertOne) SetBuildCount(v int32) *EnvUpsertOne

SetBuildCount sets the "build_count" field.

func (*EnvUpsertOne) SetLastSpawnedAt

func (u *EnvUpsertOne) SetLastSpawnedAt(v time.Time) *EnvUpsertOne

SetLastSpawnedAt sets the "last_spawned_at" field.

func (*EnvUpsertOne) SetPublic

func (u *EnvUpsertOne) SetPublic(v bool) *EnvUpsertOne

SetPublic sets the "public" field.

func (*EnvUpsertOne) SetSpawnCount

func (u *EnvUpsertOne) SetSpawnCount(v int64) *EnvUpsertOne

SetSpawnCount sets the "spawn_count" field.

func (*EnvUpsertOne) SetTeamID

func (u *EnvUpsertOne) SetTeamID(v uuid.UUID) *EnvUpsertOne

SetTeamID sets the "team_id" field.

func (*EnvUpsertOne) SetUpdatedAt

func (u *EnvUpsertOne) SetUpdatedAt(v time.Time) *EnvUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*EnvUpsertOne) Update

func (u *EnvUpsertOne) Update(set func(*EnvUpsert)) *EnvUpsertOne

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

func (*EnvUpsertOne) UpdateBuildCount

func (u *EnvUpsertOne) UpdateBuildCount() *EnvUpsertOne

UpdateBuildCount sets the "build_count" field to the value that was provided on create.

func (*EnvUpsertOne) UpdateLastSpawnedAt

func (u *EnvUpsertOne) UpdateLastSpawnedAt() *EnvUpsertOne

UpdateLastSpawnedAt sets the "last_spawned_at" field to the value that was provided on create.

func (*EnvUpsertOne) UpdateNewValues

func (u *EnvUpsertOne) UpdateNewValues() *EnvUpsertOne

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

func (*EnvUpsertOne) UpdatePublic

func (u *EnvUpsertOne) UpdatePublic() *EnvUpsertOne

UpdatePublic sets the "public" field to the value that was provided on create.

func (*EnvUpsertOne) UpdateSpawnCount

func (u *EnvUpsertOne) UpdateSpawnCount() *EnvUpsertOne

UpdateSpawnCount sets the "spawn_count" field to the value that was provided on create.

func (*EnvUpsertOne) UpdateTeamID

func (u *EnvUpsertOne) UpdateTeamID() *EnvUpsertOne

UpdateTeamID sets the "team_id" field to the value that was provided on create.

func (*EnvUpsertOne) UpdateUpdatedAt

func (u *EnvUpsertOne) UpdateUpdatedAt() *EnvUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Envs

type Envs []*Env

Envs is a parsable slice of Env.

type Hook

type Hook = ent.Hook

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

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

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 AlternateSchema

func AlternateSchema(schemaConfig SchemaConfig) Option

AlternateSchemas allows alternate schema names to be passed into ent operations.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

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

type Policy

type Policy = ent.Policy

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

type Querier

type Querier = ent.Querier

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

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

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

type Query

type Query = ent.Query

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

type QueryContext

type QueryContext = ent.QueryContext

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

type RollbackFunc

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

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

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

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

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type SchemaConfig

type SchemaConfig = internal.SchemaConfig

SchemaConfig represents alternative schema names for all tables that can be passed at runtime.

type Team

type Team struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// IsDefault holds the value of the "is_default" field.
	IsDefault bool `json:"is_default,omitempty"`
	// IsBanned holds the value of the "is_banned" field.
	IsBanned bool `json:"is_banned,omitempty"`
	// IsBlocked holds the value of the "is_blocked" field.
	IsBlocked bool `json:"is_blocked,omitempty"`
	// BlockedReason holds the value of the "blocked_reason" field.
	BlockedReason *string `json:"blocked_reason,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Tier holds the value of the "tier" field.
	Tier string `json:"tier,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TeamQuery when eager-loading is set.
	Edges TeamEdges `json:"edges"`
	// contains filtered or unexported fields
}

Team is the model entity for the Team schema.

func (*Team) QueryEnvs

func (t *Team) QueryEnvs() *EnvQuery

QueryEnvs queries the "envs" edge of the Team entity.

func (*Team) QueryTeamAPIKeys

func (t *Team) QueryTeamAPIKeys() *TeamAPIKeyQuery

QueryTeamAPIKeys queries the "team_api_keys" edge of the Team entity.

func (*Team) QueryTeamTier

func (t *Team) QueryTeamTier() *TierQuery

QueryTeamTier queries the "team_tier" edge of the Team entity.

func (*Team) QueryUsers

func (t *Team) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the Team entity.

func (*Team) QueryUsersTeams

func (t *Team) QueryUsersTeams() *UsersTeamsQuery

QueryUsersTeams queries the "users_teams" edge of the Team entity.

func (*Team) String

func (t *Team) String() string

String implements the fmt.Stringer.

func (*Team) Unwrap

func (t *Team) Unwrap() *Team

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

func (t *Team) Update() *TeamUpdateOne

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

func (*Team) Value

func (t *Team) Value(name string) (ent.Value, error)

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

type TeamAPIKey

type TeamAPIKey struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// TeamID holds the value of the "team_id" field.
	TeamID uuid.UUID `json:"team_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TeamAPIKeyQuery when eager-loading is set.
	Edges TeamAPIKeyEdges `json:"edges"`
	// contains filtered or unexported fields
}

TeamAPIKey is the model entity for the TeamAPIKey schema.

func (*TeamAPIKey) QueryTeam

func (tak *TeamAPIKey) QueryTeam() *TeamQuery

QueryTeam queries the "team" edge of the TeamAPIKey entity.

func (*TeamAPIKey) String

func (tak *TeamAPIKey) String() string

String implements the fmt.Stringer.

func (*TeamAPIKey) Unwrap

func (tak *TeamAPIKey) Unwrap() *TeamAPIKey

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

func (tak *TeamAPIKey) Update() *TeamAPIKeyUpdateOne

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

func (*TeamAPIKey) Value

func (tak *TeamAPIKey) Value(name string) (ent.Value, error)

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

type TeamAPIKeyClient

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

TeamAPIKeyClient is a client for the TeamAPIKey schema.

func NewTeamAPIKeyClient

func NewTeamAPIKeyClient(c config) *TeamAPIKeyClient

NewTeamAPIKeyClient returns a client for the TeamAPIKey from the given config.

func (*TeamAPIKeyClient) Create

func (c *TeamAPIKeyClient) Create() *TeamAPIKeyCreate

Create returns a builder for creating a TeamAPIKey entity.

func (*TeamAPIKeyClient) CreateBulk

func (c *TeamAPIKeyClient) CreateBulk(builders ...*TeamAPIKeyCreate) *TeamAPIKeyCreateBulk

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

func (*TeamAPIKeyClient) Delete

func (c *TeamAPIKeyClient) Delete() *TeamAPIKeyDelete

Delete returns a delete builder for TeamAPIKey.

func (*TeamAPIKeyClient) DeleteOne

func (c *TeamAPIKeyClient) DeleteOne(tak *TeamAPIKey) *TeamAPIKeyDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TeamAPIKeyClient) DeleteOneID

func (c *TeamAPIKeyClient) DeleteOneID(id string) *TeamAPIKeyDeleteOne

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

func (*TeamAPIKeyClient) Get

func (c *TeamAPIKeyClient) Get(ctx context.Context, id string) (*TeamAPIKey, error)

Get returns a TeamAPIKey entity by its id.

func (*TeamAPIKeyClient) GetX

func (c *TeamAPIKeyClient) GetX(ctx context.Context, id string) *TeamAPIKey

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

func (*TeamAPIKeyClient) Hooks

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

Hooks returns the client hooks.

func (*TeamAPIKeyClient) Intercept

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

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

func (*TeamAPIKeyClient) Interceptors

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

Interceptors returns the client interceptors.

func (*TeamAPIKeyClient) MapCreateBulk

func (c *TeamAPIKeyClient) MapCreateBulk(slice any, setFunc func(*TeamAPIKeyCreate, int)) *TeamAPIKeyCreateBulk

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

func (c *TeamAPIKeyClient) Query() *TeamAPIKeyQuery

Query returns a query builder for TeamAPIKey.

func (*TeamAPIKeyClient) QueryTeam

func (c *TeamAPIKeyClient) QueryTeam(tak *TeamAPIKey) *TeamQuery

QueryTeam queries the team edge of a TeamAPIKey.

func (*TeamAPIKeyClient) Update

func (c *TeamAPIKeyClient) Update() *TeamAPIKeyUpdate

Update returns an update builder for TeamAPIKey.

func (*TeamAPIKeyClient) UpdateOne

func (c *TeamAPIKeyClient) UpdateOne(tak *TeamAPIKey) *TeamAPIKeyUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TeamAPIKeyClient) UpdateOneID

func (c *TeamAPIKeyClient) UpdateOneID(id string) *TeamAPIKeyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TeamAPIKeyClient) Use

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

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

type TeamAPIKeyCreate

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

TeamAPIKeyCreate is the builder for creating a TeamAPIKey entity.

func (*TeamAPIKeyCreate) Exec

func (takc *TeamAPIKeyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamAPIKeyCreate) ExecX

func (takc *TeamAPIKeyCreate) ExecX(ctx context.Context)

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

func (*TeamAPIKeyCreate) Mutation

func (takc *TeamAPIKeyCreate) Mutation() *TeamAPIKeyMutation

Mutation returns the TeamAPIKeyMutation object of the builder.

func (*TeamAPIKeyCreate) OnConflict

func (takc *TeamAPIKeyCreate) OnConflict(opts ...sql.ConflictOption) *TeamAPIKeyUpsertOne

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

client.TeamAPIKey.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TeamAPIKeyUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*TeamAPIKeyCreate) OnConflictColumns

func (takc *TeamAPIKeyCreate) OnConflictColumns(columns ...string) *TeamAPIKeyUpsertOne

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

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

func (*TeamAPIKeyCreate) Save

func (takc *TeamAPIKeyCreate) Save(ctx context.Context) (*TeamAPIKey, error)

Save creates the TeamAPIKey in the database.

func (*TeamAPIKeyCreate) SaveX

func (takc *TeamAPIKeyCreate) SaveX(ctx context.Context) *TeamAPIKey

SaveX calls Save and panics if Save returns an error.

func (*TeamAPIKeyCreate) SetCreatedAt

func (takc *TeamAPIKeyCreate) SetCreatedAt(t time.Time) *TeamAPIKeyCreate

SetCreatedAt sets the "created_at" field.

func (*TeamAPIKeyCreate) SetID

func (takc *TeamAPIKeyCreate) SetID(s string) *TeamAPIKeyCreate

SetID sets the "id" field.

func (*TeamAPIKeyCreate) SetNillableCreatedAt

func (takc *TeamAPIKeyCreate) SetNillableCreatedAt(t *time.Time) *TeamAPIKeyCreate

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

func (*TeamAPIKeyCreate) SetTeam

func (takc *TeamAPIKeyCreate) SetTeam(t *Team) *TeamAPIKeyCreate

SetTeam sets the "team" edge to the Team entity.

func (*TeamAPIKeyCreate) SetTeamID

func (takc *TeamAPIKeyCreate) SetTeamID(u uuid.UUID) *TeamAPIKeyCreate

SetTeamID sets the "team_id" field.

type TeamAPIKeyCreateBulk

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

TeamAPIKeyCreateBulk is the builder for creating many TeamAPIKey entities in bulk.

func (*TeamAPIKeyCreateBulk) Exec

func (takcb *TeamAPIKeyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamAPIKeyCreateBulk) ExecX

func (takcb *TeamAPIKeyCreateBulk) ExecX(ctx context.Context)

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

func (*TeamAPIKeyCreateBulk) OnConflict

func (takcb *TeamAPIKeyCreateBulk) OnConflict(opts ...sql.ConflictOption) *TeamAPIKeyUpsertBulk

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

client.TeamAPIKey.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.TeamAPIKeyUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*TeamAPIKeyCreateBulk) OnConflictColumns

func (takcb *TeamAPIKeyCreateBulk) OnConflictColumns(columns ...string) *TeamAPIKeyUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TeamAPIKey.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TeamAPIKeyCreateBulk) Save

func (takcb *TeamAPIKeyCreateBulk) Save(ctx context.Context) ([]*TeamAPIKey, error)

Save creates the TeamAPIKey entities in the database.

func (*TeamAPIKeyCreateBulk) SaveX

func (takcb *TeamAPIKeyCreateBulk) SaveX(ctx context.Context) []*TeamAPIKey

SaveX is like Save, but panics if an error occurs.

type TeamAPIKeyDelete

type TeamAPIKeyDelete struct {
	// contains filtered or unexported fields
}

TeamAPIKeyDelete is the builder for deleting a TeamAPIKey entity.

func (*TeamAPIKeyDelete) Exec

func (takd *TeamAPIKeyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TeamAPIKeyDelete) ExecX

func (takd *TeamAPIKeyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TeamAPIKeyDelete) Where

Where appends a list predicates to the TeamAPIKeyDelete builder.

type TeamAPIKeyDeleteOne

type TeamAPIKeyDeleteOne struct {
	// contains filtered or unexported fields
}

TeamAPIKeyDeleteOne is the builder for deleting a single TeamAPIKey entity.

func (*TeamAPIKeyDeleteOne) Exec

func (takdo *TeamAPIKeyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TeamAPIKeyDeleteOne) ExecX

func (takdo *TeamAPIKeyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamAPIKeyDeleteOne) Where

Where appends a list predicates to the TeamAPIKeyDelete builder.

type TeamAPIKeyEdges

type TeamAPIKeyEdges struct {
	// Team holds the value of the team edge.
	Team *Team `json:"team,omitempty"`
	// contains filtered or unexported fields
}

TeamAPIKeyEdges holds the relations/edges for other nodes in the graph.

func (TeamAPIKeyEdges) TeamOrErr

func (e TeamAPIKeyEdges) TeamOrErr() (*Team, error)

TeamOrErr returns the Team value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TeamAPIKeyGroupBy

type TeamAPIKeyGroupBy struct {
	// contains filtered or unexported fields
}

TeamAPIKeyGroupBy is the group-by builder for TeamAPIKey entities.

func (*TeamAPIKeyGroupBy) Aggregate

func (takgb *TeamAPIKeyGroupBy) Aggregate(fns ...AggregateFunc) *TeamAPIKeyGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TeamAPIKeyGroupBy) Bool

func (s *TeamAPIKeyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) BoolX

func (s *TeamAPIKeyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) Bools

func (s *TeamAPIKeyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) BoolsX

func (s *TeamAPIKeyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) Float64

func (s *TeamAPIKeyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) Float64X

func (s *TeamAPIKeyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) Float64s

func (s *TeamAPIKeyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) Float64sX

func (s *TeamAPIKeyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) Int

func (s *TeamAPIKeyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) IntX

func (s *TeamAPIKeyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) Ints

func (s *TeamAPIKeyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) IntsX

func (s *TeamAPIKeyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) Scan

func (takgb *TeamAPIKeyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TeamAPIKeyGroupBy) ScanX

func (s *TeamAPIKeyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) String

func (s *TeamAPIKeyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) StringX

func (s *TeamAPIKeyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TeamAPIKeyGroupBy) Strings

func (s *TeamAPIKeyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeyGroupBy) StringsX

func (s *TeamAPIKeyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TeamAPIKeyMutation

type TeamAPIKeyMutation struct {
	// contains filtered or unexported fields
}

TeamAPIKeyMutation represents an operation that mutates the TeamAPIKey nodes in the graph.

func (*TeamAPIKeyMutation) AddField

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) AddedEdges

func (m *TeamAPIKeyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TeamAPIKeyMutation) AddedField

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) AddedFields

func (m *TeamAPIKeyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TeamAPIKeyMutation) AddedIDs

func (m *TeamAPIKeyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TeamAPIKeyMutation) ClearEdge

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) ClearField

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) ClearTeam

func (m *TeamAPIKeyMutation) ClearTeam()

ClearTeam clears the "team" edge to the Team entity.

func (*TeamAPIKeyMutation) ClearedEdges

func (m *TeamAPIKeyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TeamAPIKeyMutation) ClearedFields

func (m *TeamAPIKeyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TeamAPIKeyMutation) Client

func (m TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) CreatedAt

func (m *TeamAPIKeyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TeamAPIKeyMutation) EdgeCleared

func (m *TeamAPIKeyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TeamAPIKeyMutation) Field

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) FieldCleared

func (m *TeamAPIKeyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TeamAPIKeyMutation) Fields

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) ID

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) IDs

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) OldCreatedAt

func (m *TeamAPIKeyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the TeamAPIKey entity. If the TeamAPIKey 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 (*TeamAPIKeyMutation) OldField

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) OldTeamID

func (m *TeamAPIKeyMutation) OldTeamID(ctx context.Context) (v uuid.UUID, err error)

OldTeamID returns the old "team_id" field's value of the TeamAPIKey entity. If the TeamAPIKey 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 (*TeamAPIKeyMutation) Op

func (m *TeamAPIKeyMutation) Op() Op

Op returns the operation name.

func (*TeamAPIKeyMutation) RemovedEdges

func (m *TeamAPIKeyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TeamAPIKeyMutation) RemovedIDs

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) ResetCreatedAt

func (m *TeamAPIKeyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TeamAPIKeyMutation) ResetEdge

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) ResetField

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) ResetTeam

func (m *TeamAPIKeyMutation) ResetTeam()

ResetTeam resets all changes to the "team" edge.

func (*TeamAPIKeyMutation) ResetTeamID

func (m *TeamAPIKeyMutation) ResetTeamID()

ResetTeamID resets all changes to the "team_id" field.

func (*TeamAPIKeyMutation) SetCreatedAt

func (m *TeamAPIKeyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TeamAPIKeyMutation) SetField

func (m *TeamAPIKeyMutation) 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 (*TeamAPIKeyMutation) SetID

func (m *TeamAPIKeyMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TeamAPIKey entities.

func (*TeamAPIKeyMutation) SetOp

func (m *TeamAPIKeyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TeamAPIKeyMutation) SetTeamID

func (m *TeamAPIKeyMutation) SetTeamID(u uuid.UUID)

SetTeamID sets the "team_id" field.

func (*TeamAPIKeyMutation) TeamCleared

func (m *TeamAPIKeyMutation) TeamCleared() bool

TeamCleared reports if the "team" edge to the Team entity was cleared.

func (*TeamAPIKeyMutation) TeamID

func (m *TeamAPIKeyMutation) TeamID() (r uuid.UUID, exists bool)

TeamID returns the value of the "team_id" field in the mutation.

func (*TeamAPIKeyMutation) TeamIDs

func (m *TeamAPIKeyMutation) TeamIDs() (ids []uuid.UUID)

TeamIDs returns the "team" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TeamID instead. It exists only for internal usage by the builders.

func (TeamAPIKeyMutation) Tx

func (m TeamAPIKeyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TeamAPIKeyMutation) Type

func (m *TeamAPIKeyMutation) Type() string

Type returns the node type of this mutation (TeamAPIKey).

func (*TeamAPIKeyMutation) Where

func (m *TeamAPIKeyMutation) Where(ps ...predicate.TeamAPIKey)

Where appends a list predicates to the TeamAPIKeyMutation builder.

func (*TeamAPIKeyMutation) WhereP

func (m *TeamAPIKeyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TeamAPIKeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TeamAPIKeyQuery

type TeamAPIKeyQuery struct {
	// contains filtered or unexported fields
}

TeamAPIKeyQuery is the builder for querying TeamAPIKey entities.

func (*TeamAPIKeyQuery) Aggregate

func (takq *TeamAPIKeyQuery) Aggregate(fns ...AggregateFunc) *TeamAPIKeySelect

Aggregate returns a TeamAPIKeySelect configured with the given aggregations.

func (*TeamAPIKeyQuery) All

func (takq *TeamAPIKeyQuery) All(ctx context.Context) ([]*TeamAPIKey, error)

All executes the query and returns a list of TeamAPIKeys.

func (*TeamAPIKeyQuery) AllX

func (takq *TeamAPIKeyQuery) AllX(ctx context.Context) []*TeamAPIKey

AllX is like All, but panics if an error occurs.

func (*TeamAPIKeyQuery) Clone

func (takq *TeamAPIKeyQuery) Clone() *TeamAPIKeyQuery

Clone returns a duplicate of the TeamAPIKeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TeamAPIKeyQuery) Count

func (takq *TeamAPIKeyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TeamAPIKeyQuery) CountX

func (takq *TeamAPIKeyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TeamAPIKeyQuery) Exist

func (takq *TeamAPIKeyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TeamAPIKeyQuery) ExistX

func (takq *TeamAPIKeyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TeamAPIKeyQuery) First

func (takq *TeamAPIKeyQuery) First(ctx context.Context) (*TeamAPIKey, error)

First returns the first TeamAPIKey entity from the query. Returns a *NotFoundError when no TeamAPIKey was found.

func (*TeamAPIKeyQuery) FirstID

func (takq *TeamAPIKeyQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first TeamAPIKey ID from the query. Returns a *NotFoundError when no TeamAPIKey ID was found.

func (*TeamAPIKeyQuery) FirstIDX

func (takq *TeamAPIKeyQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*TeamAPIKeyQuery) FirstX

func (takq *TeamAPIKeyQuery) FirstX(ctx context.Context) *TeamAPIKey

FirstX is like First, but panics if an error occurs.

func (*TeamAPIKeyQuery) GroupBy

func (takq *TeamAPIKeyQuery) GroupBy(field string, fields ...string) *TeamAPIKeyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TeamAPIKey.Query().
	GroupBy(teamapikey.FieldCreatedAt).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*TeamAPIKeyQuery) IDs

func (takq *TeamAPIKeyQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of TeamAPIKey IDs.

func (*TeamAPIKeyQuery) IDsX

func (takq *TeamAPIKeyQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*TeamAPIKeyQuery) Limit

func (takq *TeamAPIKeyQuery) Limit(limit int) *TeamAPIKeyQuery

Limit the number of records to be returned by this query.

func (*TeamAPIKeyQuery) Modify

func (takq *TeamAPIKeyQuery) Modify(modifiers ...func(s *sql.Selector)) *TeamAPIKeySelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TeamAPIKeyQuery) Offset

func (takq *TeamAPIKeyQuery) Offset(offset int) *TeamAPIKeyQuery

Offset to start from.

func (*TeamAPIKeyQuery) Only

func (takq *TeamAPIKeyQuery) Only(ctx context.Context) (*TeamAPIKey, error)

Only returns a single TeamAPIKey entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TeamAPIKey entity is found. Returns a *NotFoundError when no TeamAPIKey entities are found.

func (*TeamAPIKeyQuery) OnlyID

func (takq *TeamAPIKeyQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only TeamAPIKey ID in the query. Returns a *NotSingularError when more than one TeamAPIKey ID is found. Returns a *NotFoundError when no entities are found.

func (*TeamAPIKeyQuery) OnlyIDX

func (takq *TeamAPIKeyQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TeamAPIKeyQuery) OnlyX

func (takq *TeamAPIKeyQuery) OnlyX(ctx context.Context) *TeamAPIKey

OnlyX is like Only, but panics if an error occurs.

func (*TeamAPIKeyQuery) Order

Order specifies how the records should be ordered.

func (*TeamAPIKeyQuery) QueryTeam

func (takq *TeamAPIKeyQuery) QueryTeam() *TeamQuery

QueryTeam chains the current query on the "team" edge.

func (*TeamAPIKeyQuery) Select

func (takq *TeamAPIKeyQuery) Select(fields ...string) *TeamAPIKeySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.TeamAPIKey.Query().
	Select(teamapikey.FieldCreatedAt).
	Scan(ctx, &v)

func (*TeamAPIKeyQuery) Unique

func (takq *TeamAPIKeyQuery) Unique(unique bool) *TeamAPIKeyQuery

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 (*TeamAPIKeyQuery) Where

Where adds a new predicate for the TeamAPIKeyQuery builder.

func (*TeamAPIKeyQuery) WithTeam

func (takq *TeamAPIKeyQuery) WithTeam(opts ...func(*TeamQuery)) *TeamAPIKeyQuery

WithTeam tells the query-builder to eager-load the nodes that are connected to the "team" edge. The optional arguments are used to configure the query builder of the edge.

type TeamAPIKeySelect

type TeamAPIKeySelect struct {
	*TeamAPIKeyQuery
	// contains filtered or unexported fields
}

TeamAPIKeySelect is the builder for selecting fields of TeamAPIKey entities.

func (*TeamAPIKeySelect) Aggregate

func (taks *TeamAPIKeySelect) Aggregate(fns ...AggregateFunc) *TeamAPIKeySelect

Aggregate adds the given aggregation functions to the selector query.

func (*TeamAPIKeySelect) Bool

func (s *TeamAPIKeySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) BoolX

func (s *TeamAPIKeySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TeamAPIKeySelect) Bools

func (s *TeamAPIKeySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) BoolsX

func (s *TeamAPIKeySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TeamAPIKeySelect) Float64

func (s *TeamAPIKeySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) Float64X

func (s *TeamAPIKeySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TeamAPIKeySelect) Float64s

func (s *TeamAPIKeySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) Float64sX

func (s *TeamAPIKeySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TeamAPIKeySelect) Int

func (s *TeamAPIKeySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) IntX

func (s *TeamAPIKeySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TeamAPIKeySelect) Ints

func (s *TeamAPIKeySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) IntsX

func (s *TeamAPIKeySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TeamAPIKeySelect) Modify

func (taks *TeamAPIKeySelect) Modify(modifiers ...func(s *sql.Selector)) *TeamAPIKeySelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TeamAPIKeySelect) Scan

func (taks *TeamAPIKeySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TeamAPIKeySelect) ScanX

func (s *TeamAPIKeySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TeamAPIKeySelect) String

func (s *TeamAPIKeySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) StringX

func (s *TeamAPIKeySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TeamAPIKeySelect) Strings

func (s *TeamAPIKeySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TeamAPIKeySelect) StringsX

func (s *TeamAPIKeySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TeamAPIKeyUpdate

type TeamAPIKeyUpdate struct {
	// contains filtered or unexported fields
}

TeamAPIKeyUpdate is the builder for updating TeamAPIKey entities.

func (*TeamAPIKeyUpdate) ClearTeam

func (taku *TeamAPIKeyUpdate) ClearTeam() *TeamAPIKeyUpdate

ClearTeam clears the "team" edge to the Team entity.

func (*TeamAPIKeyUpdate) Exec

func (taku *TeamAPIKeyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamAPIKeyUpdate) ExecX

func (taku *TeamAPIKeyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamAPIKeyUpdate) Modify

func (taku *TeamAPIKeyUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TeamAPIKeyUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TeamAPIKeyUpdate) Mutation

func (taku *TeamAPIKeyUpdate) Mutation() *TeamAPIKeyMutation

Mutation returns the TeamAPIKeyMutation object of the builder.

func (*TeamAPIKeyUpdate) Save

func (taku *TeamAPIKeyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TeamAPIKeyUpdate) SaveX

func (taku *TeamAPIKeyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TeamAPIKeyUpdate) SetNillableTeamID

func (taku *TeamAPIKeyUpdate) SetNillableTeamID(u *uuid.UUID) *TeamAPIKeyUpdate

SetNillableTeamID sets the "team_id" field if the given value is not nil.

func (*TeamAPIKeyUpdate) SetTeam

func (taku *TeamAPIKeyUpdate) SetTeam(t *Team) *TeamAPIKeyUpdate

SetTeam sets the "team" edge to the Team entity.

func (*TeamAPIKeyUpdate) SetTeamID

func (taku *TeamAPIKeyUpdate) SetTeamID(u uuid.UUID) *TeamAPIKeyUpdate

SetTeamID sets the "team_id" field.

func (*TeamAPIKeyUpdate) Where

Where appends a list predicates to the TeamAPIKeyUpdate builder.

type TeamAPIKeyUpdateOne

type TeamAPIKeyUpdateOne struct {
	// contains filtered or unexported fields
}

TeamAPIKeyUpdateOne is the builder for updating a single TeamAPIKey entity.

func (*TeamAPIKeyUpdateOne) ClearTeam

func (takuo *TeamAPIKeyUpdateOne) ClearTeam() *TeamAPIKeyUpdateOne

ClearTeam clears the "team" edge to the Team entity.

func (*TeamAPIKeyUpdateOne) Exec

func (takuo *TeamAPIKeyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TeamAPIKeyUpdateOne) ExecX

func (takuo *TeamAPIKeyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamAPIKeyUpdateOne) Modify

func (takuo *TeamAPIKeyUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TeamAPIKeyUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TeamAPIKeyUpdateOne) Mutation

func (takuo *TeamAPIKeyUpdateOne) Mutation() *TeamAPIKeyMutation

Mutation returns the TeamAPIKeyMutation object of the builder.

func (*TeamAPIKeyUpdateOne) Save

func (takuo *TeamAPIKeyUpdateOne) Save(ctx context.Context) (*TeamAPIKey, error)

Save executes the query and returns the updated TeamAPIKey entity.

func (*TeamAPIKeyUpdateOne) SaveX

func (takuo *TeamAPIKeyUpdateOne) SaveX(ctx context.Context) *TeamAPIKey

SaveX is like Save, but panics if an error occurs.

func (*TeamAPIKeyUpdateOne) Select

func (takuo *TeamAPIKeyUpdateOne) Select(field string, fields ...string) *TeamAPIKeyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TeamAPIKeyUpdateOne) SetNillableTeamID

func (takuo *TeamAPIKeyUpdateOne) SetNillableTeamID(u *uuid.UUID) *TeamAPIKeyUpdateOne

SetNillableTeamID sets the "team_id" field if the given value is not nil.

func (*TeamAPIKeyUpdateOne) SetTeam

func (takuo *TeamAPIKeyUpdateOne) SetTeam(t *Team) *TeamAPIKeyUpdateOne

SetTeam sets the "team" edge to the Team entity.

func (*TeamAPIKeyUpdateOne) SetTeamID

func (takuo *TeamAPIKeyUpdateOne) SetTeamID(u uuid.UUID) *TeamAPIKeyUpdateOne

SetTeamID sets the "team_id" field.

func (*TeamAPIKeyUpdateOne) Where

Where appends a list predicates to the TeamAPIKeyUpdate builder.

type TeamAPIKeyUpsert

type TeamAPIKeyUpsert struct {
	*sql.UpdateSet
}

TeamAPIKeyUpsert is the "OnConflict" setter.

func (*TeamAPIKeyUpsert) SetTeamID

func (u *TeamAPIKeyUpsert) SetTeamID(v uuid.UUID) *TeamAPIKeyUpsert

SetTeamID sets the "team_id" field.

func (*TeamAPIKeyUpsert) UpdateTeamID

func (u *TeamAPIKeyUpsert) UpdateTeamID() *TeamAPIKeyUpsert

UpdateTeamID sets the "team_id" field to the value that was provided on create.

type TeamAPIKeyUpsertBulk

type TeamAPIKeyUpsertBulk struct {
	// contains filtered or unexported fields
}

TeamAPIKeyUpsertBulk is the builder for "upsert"-ing a bulk of TeamAPIKey nodes.

func (*TeamAPIKeyUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TeamAPIKeyUpsertBulk) Exec

Exec executes the query.

func (*TeamAPIKeyUpsertBulk) ExecX

func (u *TeamAPIKeyUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamAPIKeyUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TeamAPIKey.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TeamAPIKeyUpsertBulk) SetTeamID

SetTeamID sets the "team_id" field.

func (*TeamAPIKeyUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the TeamAPIKeyCreateBulk.OnConflict documentation for more info.

func (*TeamAPIKeyUpsertBulk) UpdateNewValues

func (u *TeamAPIKeyUpsertBulk) UpdateNewValues() *TeamAPIKeyUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TeamAPIKey.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(teamapikey.FieldID)
		}),
	).
	Exec(ctx)

func (*TeamAPIKeyUpsertBulk) UpdateTeamID

func (u *TeamAPIKeyUpsertBulk) UpdateTeamID() *TeamAPIKeyUpsertBulk

UpdateTeamID sets the "team_id" field to the value that was provided on create.

type TeamAPIKeyUpsertOne

type TeamAPIKeyUpsertOne struct {
	// contains filtered or unexported fields
}

TeamAPIKeyUpsertOne is the builder for "upsert"-ing

one TeamAPIKey node.

func (*TeamAPIKeyUpsertOne) DoNothing

func (u *TeamAPIKeyUpsertOne) DoNothing() *TeamAPIKeyUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TeamAPIKeyUpsertOne) Exec

Exec executes the query.

func (*TeamAPIKeyUpsertOne) ExecX

func (u *TeamAPIKeyUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamAPIKeyUpsertOne) ID

func (u *TeamAPIKeyUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TeamAPIKeyUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*TeamAPIKeyUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TeamAPIKey.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TeamAPIKeyUpsertOne) SetTeamID

SetTeamID sets the "team_id" field.

func (*TeamAPIKeyUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the TeamAPIKeyCreate.OnConflict documentation for more info.

func (*TeamAPIKeyUpsertOne) UpdateNewValues

func (u *TeamAPIKeyUpsertOne) UpdateNewValues() *TeamAPIKeyUpsertOne

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.TeamAPIKey.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(teamapikey.FieldID)
		}),
	).
	Exec(ctx)

func (*TeamAPIKeyUpsertOne) UpdateTeamID

func (u *TeamAPIKeyUpsertOne) UpdateTeamID() *TeamAPIKeyUpsertOne

UpdateTeamID sets the "team_id" field to the value that was provided on create.

type TeamAPIKeys

type TeamAPIKeys []*TeamAPIKey

TeamAPIKeys is a parsable slice of TeamAPIKey.

type TeamClient

type TeamClient struct {
	// contains filtered or unexported fields
}

TeamClient is a client for the Team schema.

func NewTeamClient

func NewTeamClient(c config) *TeamClient

NewTeamClient returns a client for the Team from the given config.

func (*TeamClient) Create

func (c *TeamClient) Create() *TeamCreate

Create returns a builder for creating a Team entity.

func (*TeamClient) CreateBulk

func (c *TeamClient) CreateBulk(builders ...*TeamCreate) *TeamCreateBulk

CreateBulk returns a builder for creating a bulk of Team entities.

func (*TeamClient) Delete

func (c *TeamClient) Delete() *TeamDelete

Delete returns a delete builder for Team.

func (*TeamClient) DeleteOne

func (c *TeamClient) DeleteOne(t *Team) *TeamDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TeamClient) DeleteOneID

func (c *TeamClient) DeleteOneID(id uuid.UUID) *TeamDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TeamClient) Get

func (c *TeamClient) Get(ctx context.Context, id uuid.UUID) (*Team, error)

Get returns a Team entity by its id.

func (*TeamClient) GetX

func (c *TeamClient) GetX(ctx context.Context, id uuid.UUID) *Team

GetX is like Get, but panics if an error occurs.

func (*TeamClient) Hooks

func (c *TeamClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TeamClient) Intercept

func (c *TeamClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `team.Intercept(f(g(h())))`.

func (*TeamClient) Interceptors

func (c *TeamClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TeamClient) MapCreateBulk

func (c *TeamClient) MapCreateBulk(slice any, setFunc func(*TeamCreate, int)) *TeamCreateBulk

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 (*TeamClient) Query

func (c *TeamClient) Query() *TeamQuery

Query returns a query builder for Team.

func (*TeamClient) QueryEnvs

func (c *TeamClient) QueryEnvs(t *Team) *EnvQuery

QueryEnvs queries the envs edge of a Team.

func (*TeamClient) QueryTeamAPIKeys

func (c *TeamClient) QueryTeamAPIKeys(t *Team) *TeamAPIKeyQuery

QueryTeamAPIKeys queries the team_api_keys edge of a Team.

func (*TeamClient) QueryTeamTier

func (c *TeamClient) QueryTeamTier(t *Team) *TierQuery

QueryTeamTier queries the team_tier edge of a Team.

func (*TeamClient) QueryUsers

func (c *TeamClient) QueryUsers(t *Team) *UserQuery

QueryUsers queries the users edge of a Team.

func (*TeamClient) QueryUsersTeams

func (c *TeamClient) QueryUsersTeams(t *Team) *UsersTeamsQuery

QueryUsersTeams queries the users_teams edge of a Team.

func (*TeamClient) Update

func (c *TeamClient) Update() *TeamUpdate

Update returns an update builder for Team.

func (*TeamClient) UpdateOne

func (c *TeamClient) UpdateOne(t *Team) *TeamUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TeamClient) UpdateOneID

func (c *TeamClient) UpdateOneID(id uuid.UUID) *TeamUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TeamClient) Use

func (c *TeamClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `team.Hooks(f(g(h())))`.

type TeamCreate

type TeamCreate struct {
	// contains filtered or unexported fields
}

TeamCreate is the builder for creating a Team entity.

func (*TeamCreate) AddEnvIDs

func (tc *TeamCreate) AddEnvIDs(ids ...string) *TeamCreate

AddEnvIDs adds the "envs" edge to the Env entity by IDs.

func (*TeamCreate) AddEnvs

func (tc *TeamCreate) AddEnvs(e ...*Env) *TeamCreate

AddEnvs adds the "envs" edges to the Env entity.

func (*TeamCreate) AddTeamAPIKeyIDs

func (tc *TeamCreate) AddTeamAPIKeyIDs(ids ...string) *TeamCreate

AddTeamAPIKeyIDs adds the "team_api_keys" edge to the TeamAPIKey entity by IDs.

func (*TeamCreate) AddTeamAPIKeys

func (tc *TeamCreate) AddTeamAPIKeys(t ...*TeamAPIKey) *TeamCreate

AddTeamAPIKeys adds the "team_api_keys" edges to the TeamAPIKey entity.

func (*TeamCreate) AddUserIDs

func (tc *TeamCreate) AddUserIDs(ids ...uuid.UUID) *TeamCreate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*TeamCreate) AddUsers

func (tc *TeamCreate) AddUsers(u ...*User) *TeamCreate

AddUsers adds the "users" edges to the User entity.

func (*TeamCreate) AddUsersTeamIDs

func (tc *TeamCreate) AddUsersTeamIDs(ids ...int) *TeamCreate

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by IDs.

func (*TeamCreate) AddUsersTeams

func (tc *TeamCreate) AddUsersTeams(u ...*UsersTeams) *TeamCreate

AddUsersTeams adds the "users_teams" edges to the UsersTeams entity.

func (*TeamCreate) Exec

func (tc *TeamCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamCreate) ExecX

func (tc *TeamCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamCreate) Mutation

func (tc *TeamCreate) Mutation() *TeamMutation

Mutation returns the TeamMutation object of the builder.

func (*TeamCreate) OnConflict

func (tc *TeamCreate) OnConflict(opts ...sql.ConflictOption) *TeamUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Team.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TeamUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*TeamCreate) OnConflictColumns

func (tc *TeamCreate) OnConflictColumns(columns ...string) *TeamUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Team.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TeamCreate) Save

func (tc *TeamCreate) Save(ctx context.Context) (*Team, error)

Save creates the Team in the database.

func (*TeamCreate) SaveX

func (tc *TeamCreate) SaveX(ctx context.Context) *Team

SaveX calls Save and panics if Save returns an error.

func (*TeamCreate) SetBlockedReason

func (tc *TeamCreate) SetBlockedReason(s string) *TeamCreate

SetBlockedReason sets the "blocked_reason" field.

func (*TeamCreate) SetCreatedAt

func (tc *TeamCreate) SetCreatedAt(t time.Time) *TeamCreate

SetCreatedAt sets the "created_at" field.

func (*TeamCreate) SetEmail

func (tc *TeamCreate) SetEmail(s string) *TeamCreate

SetEmail sets the "email" field.

func (*TeamCreate) SetID

func (tc *TeamCreate) SetID(u uuid.UUID) *TeamCreate

SetID sets the "id" field.

func (*TeamCreate) SetIsBanned

func (tc *TeamCreate) SetIsBanned(b bool) *TeamCreate

SetIsBanned sets the "is_banned" field.

func (*TeamCreate) SetIsBlocked

func (tc *TeamCreate) SetIsBlocked(b bool) *TeamCreate

SetIsBlocked sets the "is_blocked" field.

func (*TeamCreate) SetIsDefault

func (tc *TeamCreate) SetIsDefault(b bool) *TeamCreate

SetIsDefault sets the "is_default" field.

func (*TeamCreate) SetName

func (tc *TeamCreate) SetName(s string) *TeamCreate

SetName sets the "name" field.

func (*TeamCreate) SetNillableBlockedReason

func (tc *TeamCreate) SetNillableBlockedReason(s *string) *TeamCreate

SetNillableBlockedReason sets the "blocked_reason" field if the given value is not nil.

func (*TeamCreate) SetNillableCreatedAt

func (tc *TeamCreate) SetNillableCreatedAt(t *time.Time) *TeamCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TeamCreate) SetTeamTier

func (tc *TeamCreate) SetTeamTier(t *Tier) *TeamCreate

SetTeamTier sets the "team_tier" edge to the Tier entity.

func (*TeamCreate) SetTeamTierID

func (tc *TeamCreate) SetTeamTierID(id string) *TeamCreate

SetTeamTierID sets the "team_tier" edge to the Tier entity by ID.

func (*TeamCreate) SetTier

func (tc *TeamCreate) SetTier(s string) *TeamCreate

SetTier sets the "tier" field.

type TeamCreateBulk

type TeamCreateBulk struct {
	// contains filtered or unexported fields
}

TeamCreateBulk is the builder for creating many Team entities in bulk.

func (*TeamCreateBulk) Exec

func (tcb *TeamCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamCreateBulk) ExecX

func (tcb *TeamCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamCreateBulk) OnConflict

func (tcb *TeamCreateBulk) OnConflict(opts ...sql.ConflictOption) *TeamUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Team.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.TeamUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*TeamCreateBulk) OnConflictColumns

func (tcb *TeamCreateBulk) OnConflictColumns(columns ...string) *TeamUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Team.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TeamCreateBulk) Save

func (tcb *TeamCreateBulk) Save(ctx context.Context) ([]*Team, error)

Save creates the Team entities in the database.

func (*TeamCreateBulk) SaveX

func (tcb *TeamCreateBulk) SaveX(ctx context.Context) []*Team

SaveX is like Save, but panics if an error occurs.

type TeamDelete

type TeamDelete struct {
	// contains filtered or unexported fields
}

TeamDelete is the builder for deleting a Team entity.

func (*TeamDelete) Exec

func (td *TeamDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TeamDelete) ExecX

func (td *TeamDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TeamDelete) Where

func (td *TeamDelete) Where(ps ...predicate.Team) *TeamDelete

Where appends a list predicates to the TeamDelete builder.

type TeamDeleteOne

type TeamDeleteOne struct {
	// contains filtered or unexported fields
}

TeamDeleteOne is the builder for deleting a single Team entity.

func (*TeamDeleteOne) Exec

func (tdo *TeamDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TeamDeleteOne) ExecX

func (tdo *TeamDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamDeleteOne) Where

func (tdo *TeamDeleteOne) Where(ps ...predicate.Team) *TeamDeleteOne

Where appends a list predicates to the TeamDelete builder.

type TeamEdges

type TeamEdges struct {
	// Users holds the value of the users edge.
	Users []*User `json:"users,omitempty"`
	// TeamAPIKeys holds the value of the team_api_keys edge.
	TeamAPIKeys []*TeamAPIKey `json:"team_api_keys,omitempty"`
	// TeamTier holds the value of the team_tier edge.
	TeamTier *Tier `json:"team_tier,omitempty"`
	// Envs holds the value of the envs edge.
	Envs []*Env `json:"envs,omitempty"`
	// UsersTeams holds the value of the users_teams edge.
	UsersTeams []*UsersTeams `json:"users_teams,omitempty"`
	// contains filtered or unexported fields
}

TeamEdges holds the relations/edges for other nodes in the graph.

func (TeamEdges) EnvsOrErr

func (e TeamEdges) EnvsOrErr() ([]*Env, error)

EnvsOrErr returns the Envs value or an error if the edge was not loaded in eager-loading.

func (TeamEdges) TeamAPIKeysOrErr

func (e TeamEdges) TeamAPIKeysOrErr() ([]*TeamAPIKey, error)

TeamAPIKeysOrErr returns the TeamAPIKeys value or an error if the edge was not loaded in eager-loading.

func (TeamEdges) TeamTierOrErr

func (e TeamEdges) TeamTierOrErr() (*Tier, error)

TeamTierOrErr returns the TeamTier value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TeamEdges) UsersOrErr

func (e TeamEdges) UsersOrErr() ([]*User, error)

UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.

func (TeamEdges) UsersTeamsOrErr

func (e TeamEdges) UsersTeamsOrErr() ([]*UsersTeams, error)

UsersTeamsOrErr returns the UsersTeams value or an error if the edge was not loaded in eager-loading.

type TeamGroupBy

type TeamGroupBy struct {
	// contains filtered or unexported fields
}

TeamGroupBy is the group-by builder for Team entities.

func (*TeamGroupBy) Aggregate

func (tgb *TeamGroupBy) Aggregate(fns ...AggregateFunc) *TeamGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TeamGroupBy) Bool

func (s *TeamGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) BoolX

func (s *TeamGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TeamGroupBy) Bools

func (s *TeamGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) BoolsX

func (s *TeamGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TeamGroupBy) Float64

func (s *TeamGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) Float64X

func (s *TeamGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TeamGroupBy) Float64s

func (s *TeamGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) Float64sX

func (s *TeamGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TeamGroupBy) Int

func (s *TeamGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) IntX

func (s *TeamGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TeamGroupBy) Ints

func (s *TeamGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) IntsX

func (s *TeamGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TeamGroupBy) Scan

func (tgb *TeamGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TeamGroupBy) ScanX

func (s *TeamGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TeamGroupBy) String

func (s *TeamGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) StringX

func (s *TeamGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TeamGroupBy) Strings

func (s *TeamGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TeamGroupBy) StringsX

func (s *TeamGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TeamMutation

type TeamMutation struct {
	// contains filtered or unexported fields
}

TeamMutation represents an operation that mutates the Team nodes in the graph.

func (*TeamMutation) AddEnvIDs

func (m *TeamMutation) AddEnvIDs(ids ...string)

AddEnvIDs adds the "envs" edge to the Env entity by ids.

func (*TeamMutation) AddField

func (m *TeamMutation) 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 (*TeamMutation) AddTeamAPIKeyIDs

func (m *TeamMutation) AddTeamAPIKeyIDs(ids ...string)

AddTeamAPIKeyIDs adds the "team_api_keys" edge to the TeamAPIKey entity by ids.

func (*TeamMutation) AddUserIDs

func (m *TeamMutation) AddUserIDs(ids ...uuid.UUID)

AddUserIDs adds the "users" edge to the User entity by ids.

func (*TeamMutation) AddUsersTeamIDs

func (m *TeamMutation) AddUsersTeamIDs(ids ...int)

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by ids.

func (*TeamMutation) AddedEdges

func (m *TeamMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TeamMutation) AddedField

func (m *TeamMutation) 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 (*TeamMutation) AddedFields

func (m *TeamMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TeamMutation) AddedIDs

func (m *TeamMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TeamMutation) BlockedReason

func (m *TeamMutation) BlockedReason() (r string, exists bool)

BlockedReason returns the value of the "blocked_reason" field in the mutation.

func (*TeamMutation) BlockedReasonCleared

func (m *TeamMutation) BlockedReasonCleared() bool

BlockedReasonCleared returns if the "blocked_reason" field was cleared in this mutation.

func (*TeamMutation) ClearBlockedReason

func (m *TeamMutation) ClearBlockedReason()

ClearBlockedReason clears the value of the "blocked_reason" field.

func (*TeamMutation) ClearEdge

func (m *TeamMutation) 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 (*TeamMutation) ClearEnvs

func (m *TeamMutation) ClearEnvs()

ClearEnvs clears the "envs" edge to the Env entity.

func (*TeamMutation) ClearField

func (m *TeamMutation) 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 (*TeamMutation) ClearTeamAPIKeys

func (m *TeamMutation) ClearTeamAPIKeys()

ClearTeamAPIKeys clears the "team_api_keys" edge to the TeamAPIKey entity.

func (*TeamMutation) ClearTeamTier

func (m *TeamMutation) ClearTeamTier()

ClearTeamTier clears the "team_tier" edge to the Tier entity.

func (*TeamMutation) ClearUsers

func (m *TeamMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*TeamMutation) ClearUsersTeams

func (m *TeamMutation) ClearUsersTeams()

ClearUsersTeams clears the "users_teams" edge to the UsersTeams entity.

func (*TeamMutation) ClearedEdges

func (m *TeamMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TeamMutation) ClearedFields

func (m *TeamMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TeamMutation) Client

func (m TeamMutation) 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 (*TeamMutation) CreatedAt

func (m *TeamMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TeamMutation) EdgeCleared

func (m *TeamMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TeamMutation) Email

func (m *TeamMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*TeamMutation) EnvsCleared

func (m *TeamMutation) EnvsCleared() bool

EnvsCleared reports if the "envs" edge to the Env entity was cleared.

func (*TeamMutation) EnvsIDs

func (m *TeamMutation) EnvsIDs() (ids []string)

EnvsIDs returns the "envs" edge IDs in the mutation.

func (*TeamMutation) Field

func (m *TeamMutation) 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 (*TeamMutation) FieldCleared

func (m *TeamMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TeamMutation) Fields

func (m *TeamMutation) 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 (*TeamMutation) ID

func (m *TeamMutation) 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 (*TeamMutation) IDs

func (m *TeamMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*TeamMutation) IsBanned

func (m *TeamMutation) IsBanned() (r bool, exists bool)

IsBanned returns the value of the "is_banned" field in the mutation.

func (*TeamMutation) IsBlocked

func (m *TeamMutation) IsBlocked() (r bool, exists bool)

IsBlocked returns the value of the "is_blocked" field in the mutation.

func (*TeamMutation) IsDefault

func (m *TeamMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*TeamMutation) Name

func (m *TeamMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TeamMutation) OldBlockedReason

func (m *TeamMutation) OldBlockedReason(ctx context.Context) (v *string, err error)

OldBlockedReason returns the old "blocked_reason" field's value of the Team entity. If the Team 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 (*TeamMutation) OldCreatedAt

func (m *TeamMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Team entity. If the Team 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 (*TeamMutation) OldEmail

func (m *TeamMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Team entity. If the Team 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 (*TeamMutation) OldField

func (m *TeamMutation) 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 (*TeamMutation) OldIsBanned

func (m *TeamMutation) OldIsBanned(ctx context.Context) (v bool, err error)

OldIsBanned returns the old "is_banned" field's value of the Team entity. If the Team 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 (*TeamMutation) OldIsBlocked

func (m *TeamMutation) OldIsBlocked(ctx context.Context) (v bool, err error)

OldIsBlocked returns the old "is_blocked" field's value of the Team entity. If the Team 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 (*TeamMutation) OldIsDefault

func (m *TeamMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the Team entity. If the Team 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 (*TeamMutation) OldName

func (m *TeamMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Team entity. If the Team 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 (*TeamMutation) OldTier

func (m *TeamMutation) OldTier(ctx context.Context) (v string, err error)

OldTier returns the old "tier" field's value of the Team entity. If the Team 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 (*TeamMutation) Op

func (m *TeamMutation) Op() Op

Op returns the operation name.

func (*TeamMutation) RemoveEnvIDs

func (m *TeamMutation) RemoveEnvIDs(ids ...string)

RemoveEnvIDs removes the "envs" edge to the Env entity by IDs.

func (*TeamMutation) RemoveTeamAPIKeyIDs

func (m *TeamMutation) RemoveTeamAPIKeyIDs(ids ...string)

RemoveTeamAPIKeyIDs removes the "team_api_keys" edge to the TeamAPIKey entity by IDs.

func (*TeamMutation) RemoveUserIDs

func (m *TeamMutation) RemoveUserIDs(ids ...uuid.UUID)

RemoveUserIDs removes the "users" edge to the User entity by IDs.

func (*TeamMutation) RemoveUsersTeamIDs

func (m *TeamMutation) RemoveUsersTeamIDs(ids ...int)

RemoveUsersTeamIDs removes the "users_teams" edge to the UsersTeams entity by IDs.

func (*TeamMutation) RemovedEdges

func (m *TeamMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TeamMutation) RemovedEnvsIDs

func (m *TeamMutation) RemovedEnvsIDs() (ids []string)

RemovedEnvs returns the removed IDs of the "envs" edge to the Env entity.

func (*TeamMutation) RemovedIDs

func (m *TeamMutation) 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 (*TeamMutation) RemovedTeamAPIKeysIDs

func (m *TeamMutation) RemovedTeamAPIKeysIDs() (ids []string)

RemovedTeamAPIKeys returns the removed IDs of the "team_api_keys" edge to the TeamAPIKey entity.

func (*TeamMutation) RemovedUsersIDs

func (m *TeamMutation) RemovedUsersIDs() (ids []uuid.UUID)

RemovedUsers returns the removed IDs of the "users" edge to the User entity.

func (*TeamMutation) RemovedUsersTeamsIDs

func (m *TeamMutation) RemovedUsersTeamsIDs() (ids []int)

RemovedUsersTeams returns the removed IDs of the "users_teams" edge to the UsersTeams entity.

func (*TeamMutation) ResetBlockedReason

func (m *TeamMutation) ResetBlockedReason()

ResetBlockedReason resets all changes to the "blocked_reason" field.

func (*TeamMutation) ResetCreatedAt

func (m *TeamMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TeamMutation) ResetEdge

func (m *TeamMutation) 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 (*TeamMutation) ResetEmail

func (m *TeamMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*TeamMutation) ResetEnvs

func (m *TeamMutation) ResetEnvs()

ResetEnvs resets all changes to the "envs" edge.

func (*TeamMutation) ResetField

func (m *TeamMutation) 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 (*TeamMutation) ResetIsBanned

func (m *TeamMutation) ResetIsBanned()

ResetIsBanned resets all changes to the "is_banned" field.

func (*TeamMutation) ResetIsBlocked

func (m *TeamMutation) ResetIsBlocked()

ResetIsBlocked resets all changes to the "is_blocked" field.

func (*TeamMutation) ResetIsDefault

func (m *TeamMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*TeamMutation) ResetName

func (m *TeamMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TeamMutation) ResetTeamAPIKeys

func (m *TeamMutation) ResetTeamAPIKeys()

ResetTeamAPIKeys resets all changes to the "team_api_keys" edge.

func (*TeamMutation) ResetTeamTier

func (m *TeamMutation) ResetTeamTier()

ResetTeamTier resets all changes to the "team_tier" edge.

func (*TeamMutation) ResetTier

func (m *TeamMutation) ResetTier()

ResetTier resets all changes to the "tier" field.

func (*TeamMutation) ResetUsers

func (m *TeamMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*TeamMutation) ResetUsersTeams

func (m *TeamMutation) ResetUsersTeams()

ResetUsersTeams resets all changes to the "users_teams" edge.

func (*TeamMutation) SetBlockedReason

func (m *TeamMutation) SetBlockedReason(s string)

SetBlockedReason sets the "blocked_reason" field.

func (*TeamMutation) SetCreatedAt

func (m *TeamMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TeamMutation) SetEmail

func (m *TeamMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*TeamMutation) SetField

func (m *TeamMutation) 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 (*TeamMutation) SetID

func (m *TeamMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Team entities.

func (*TeamMutation) SetIsBanned

func (m *TeamMutation) SetIsBanned(b bool)

SetIsBanned sets the "is_banned" field.

func (*TeamMutation) SetIsBlocked

func (m *TeamMutation) SetIsBlocked(b bool)

SetIsBlocked sets the "is_blocked" field.

func (*TeamMutation) SetIsDefault

func (m *TeamMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*TeamMutation) SetName

func (m *TeamMutation) SetName(s string)

SetName sets the "name" field.

func (*TeamMutation) SetOp

func (m *TeamMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TeamMutation) SetTeamTierID

func (m *TeamMutation) SetTeamTierID(id string)

SetTeamTierID sets the "team_tier" edge to the Tier entity by id.

func (*TeamMutation) SetTier

func (m *TeamMutation) SetTier(s string)

SetTier sets the "tier" field.

func (*TeamMutation) TeamAPIKeysCleared

func (m *TeamMutation) TeamAPIKeysCleared() bool

TeamAPIKeysCleared reports if the "team_api_keys" edge to the TeamAPIKey entity was cleared.

func (*TeamMutation) TeamAPIKeysIDs

func (m *TeamMutation) TeamAPIKeysIDs() (ids []string)

TeamAPIKeysIDs returns the "team_api_keys" edge IDs in the mutation.

func (*TeamMutation) TeamTierCleared

func (m *TeamMutation) TeamTierCleared() bool

TeamTierCleared reports if the "team_tier" edge to the Tier entity was cleared.

func (*TeamMutation) TeamTierID

func (m *TeamMutation) TeamTierID() (id string, exists bool)

TeamTierID returns the "team_tier" edge ID in the mutation.

func (*TeamMutation) TeamTierIDs

func (m *TeamMutation) TeamTierIDs() (ids []string)

TeamTierIDs returns the "team_tier" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TeamTierID instead. It exists only for internal usage by the builders.

func (*TeamMutation) Tier

func (m *TeamMutation) Tier() (r string, exists bool)

Tier returns the value of the "tier" field in the mutation.

func (TeamMutation) Tx

func (m TeamMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TeamMutation) Type

func (m *TeamMutation) Type() string

Type returns the node type of this mutation (Team).

func (*TeamMutation) UsersCleared

func (m *TeamMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*TeamMutation) UsersIDs

func (m *TeamMutation) UsersIDs() (ids []uuid.UUID)

UsersIDs returns the "users" edge IDs in the mutation.

func (*TeamMutation) UsersTeamsCleared

func (m *TeamMutation) UsersTeamsCleared() bool

UsersTeamsCleared reports if the "users_teams" edge to the UsersTeams entity was cleared.

func (*TeamMutation) UsersTeamsIDs

func (m *TeamMutation) UsersTeamsIDs() (ids []int)

UsersTeamsIDs returns the "users_teams" edge IDs in the mutation.

func (*TeamMutation) Where

func (m *TeamMutation) Where(ps ...predicate.Team)

Where appends a list predicates to the TeamMutation builder.

func (*TeamMutation) WhereP

func (m *TeamMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TeamMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TeamQuery

type TeamQuery struct {
	// contains filtered or unexported fields
}

TeamQuery is the builder for querying Team entities.

func (*TeamQuery) Aggregate

func (tq *TeamQuery) Aggregate(fns ...AggregateFunc) *TeamSelect

Aggregate returns a TeamSelect configured with the given aggregations.

func (*TeamQuery) All

func (tq *TeamQuery) All(ctx context.Context) ([]*Team, error)

All executes the query and returns a list of Teams.

func (*TeamQuery) AllX

func (tq *TeamQuery) AllX(ctx context.Context) []*Team

AllX is like All, but panics if an error occurs.

func (*TeamQuery) Clone

func (tq *TeamQuery) Clone() *TeamQuery

Clone returns a duplicate of the TeamQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TeamQuery) Count

func (tq *TeamQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TeamQuery) CountX

func (tq *TeamQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TeamQuery) Exist

func (tq *TeamQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TeamQuery) ExistX

func (tq *TeamQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TeamQuery) First

func (tq *TeamQuery) First(ctx context.Context) (*Team, error)

First returns the first Team entity from the query. Returns a *NotFoundError when no Team was found.

func (*TeamQuery) FirstID

func (tq *TeamQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Team ID from the query. Returns a *NotFoundError when no Team ID was found.

func (*TeamQuery) FirstIDX

func (tq *TeamQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TeamQuery) FirstX

func (tq *TeamQuery) FirstX(ctx context.Context) *Team

FirstX is like First, but panics if an error occurs.

func (*TeamQuery) GroupBy

func (tq *TeamQuery) GroupBy(field string, fields ...string) *TeamGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Team.Query().
	GroupBy(team.FieldCreatedAt).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*TeamQuery) IDs

func (tq *TeamQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Team IDs.

func (*TeamQuery) IDsX

func (tq *TeamQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TeamQuery) Limit

func (tq *TeamQuery) Limit(limit int) *TeamQuery

Limit the number of records to be returned by this query.

func (*TeamQuery) Modify

func (tq *TeamQuery) Modify(modifiers ...func(s *sql.Selector)) *TeamSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TeamQuery) Offset

func (tq *TeamQuery) Offset(offset int) *TeamQuery

Offset to start from.

func (*TeamQuery) Only

func (tq *TeamQuery) Only(ctx context.Context) (*Team, error)

Only returns a single Team entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Team entity is found. Returns a *NotFoundError when no Team entities are found.

func (*TeamQuery) OnlyID

func (tq *TeamQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Team ID in the query. Returns a *NotSingularError when more than one Team ID is found. Returns a *NotFoundError when no entities are found.

func (*TeamQuery) OnlyIDX

func (tq *TeamQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TeamQuery) OnlyX

func (tq *TeamQuery) OnlyX(ctx context.Context) *Team

OnlyX is like Only, but panics if an error occurs.

func (*TeamQuery) Order

func (tq *TeamQuery) Order(o ...team.OrderOption) *TeamQuery

Order specifies how the records should be ordered.

func (*TeamQuery) QueryEnvs

func (tq *TeamQuery) QueryEnvs() *EnvQuery

QueryEnvs chains the current query on the "envs" edge.

func (*TeamQuery) QueryTeamAPIKeys

func (tq *TeamQuery) QueryTeamAPIKeys() *TeamAPIKeyQuery

QueryTeamAPIKeys chains the current query on the "team_api_keys" edge.

func (*TeamQuery) QueryTeamTier

func (tq *TeamQuery) QueryTeamTier() *TierQuery

QueryTeamTier chains the current query on the "team_tier" edge.

func (*TeamQuery) QueryUsers

func (tq *TeamQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*TeamQuery) QueryUsersTeams

func (tq *TeamQuery) QueryUsersTeams() *UsersTeamsQuery

QueryUsersTeams chains the current query on the "users_teams" edge.

func (*TeamQuery) Select

func (tq *TeamQuery) Select(fields ...string) *TeamSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Team.Query().
	Select(team.FieldCreatedAt).
	Scan(ctx, &v)

func (*TeamQuery) Unique

func (tq *TeamQuery) Unique(unique bool) *TeamQuery

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 (*TeamQuery) Where

func (tq *TeamQuery) Where(ps ...predicate.Team) *TeamQuery

Where adds a new predicate for the TeamQuery builder.

func (*TeamQuery) WithEnvs

func (tq *TeamQuery) WithEnvs(opts ...func(*EnvQuery)) *TeamQuery

WithEnvs tells the query-builder to eager-load the nodes that are connected to the "envs" edge. The optional arguments are used to configure the query builder of the edge.

func (*TeamQuery) WithTeamAPIKeys

func (tq *TeamQuery) WithTeamAPIKeys(opts ...func(*TeamAPIKeyQuery)) *TeamQuery

WithTeamAPIKeys tells the query-builder to eager-load the nodes that are connected to the "team_api_keys" edge. The optional arguments are used to configure the query builder of the edge.

func (*TeamQuery) WithTeamTier

func (tq *TeamQuery) WithTeamTier(opts ...func(*TierQuery)) *TeamQuery

WithTeamTier tells the query-builder to eager-load the nodes that are connected to the "team_tier" edge. The optional arguments are used to configure the query builder of the edge.

func (*TeamQuery) WithUsers

func (tq *TeamQuery) WithUsers(opts ...func(*UserQuery)) *TeamQuery

WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.

func (*TeamQuery) WithUsersTeams

func (tq *TeamQuery) WithUsersTeams(opts ...func(*UsersTeamsQuery)) *TeamQuery

WithUsersTeams tells the query-builder to eager-load the nodes that are connected to the "users_teams" edge. The optional arguments are used to configure the query builder of the edge.

type TeamSelect

type TeamSelect struct {
	*TeamQuery
	// contains filtered or unexported fields
}

TeamSelect is the builder for selecting fields of Team entities.

func (*TeamSelect) Aggregate

func (ts *TeamSelect) Aggregate(fns ...AggregateFunc) *TeamSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TeamSelect) Bool

func (s *TeamSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TeamSelect) BoolX

func (s *TeamSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TeamSelect) Bools

func (s *TeamSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TeamSelect) BoolsX

func (s *TeamSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TeamSelect) Float64

func (s *TeamSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TeamSelect) Float64X

func (s *TeamSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TeamSelect) Float64s

func (s *TeamSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TeamSelect) Float64sX

func (s *TeamSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TeamSelect) Int

func (s *TeamSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TeamSelect) IntX

func (s *TeamSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TeamSelect) Ints

func (s *TeamSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TeamSelect) IntsX

func (s *TeamSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TeamSelect) Modify

func (ts *TeamSelect) Modify(modifiers ...func(s *sql.Selector)) *TeamSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TeamSelect) Scan

func (ts *TeamSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TeamSelect) ScanX

func (s *TeamSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TeamSelect) String

func (s *TeamSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TeamSelect) StringX

func (s *TeamSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TeamSelect) Strings

func (s *TeamSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TeamSelect) StringsX

func (s *TeamSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TeamUpdate

type TeamUpdate struct {
	// contains filtered or unexported fields
}

TeamUpdate is the builder for updating Team entities.

func (*TeamUpdate) AddEnvIDs

func (tu *TeamUpdate) AddEnvIDs(ids ...string) *TeamUpdate

AddEnvIDs adds the "envs" edge to the Env entity by IDs.

func (*TeamUpdate) AddEnvs

func (tu *TeamUpdate) AddEnvs(e ...*Env) *TeamUpdate

AddEnvs adds the "envs" edges to the Env entity.

func (*TeamUpdate) AddTeamAPIKeyIDs

func (tu *TeamUpdate) AddTeamAPIKeyIDs(ids ...string) *TeamUpdate

AddTeamAPIKeyIDs adds the "team_api_keys" edge to the TeamAPIKey entity by IDs.

func (*TeamUpdate) AddTeamAPIKeys

func (tu *TeamUpdate) AddTeamAPIKeys(t ...*TeamAPIKey) *TeamUpdate

AddTeamAPIKeys adds the "team_api_keys" edges to the TeamAPIKey entity.

func (*TeamUpdate) AddUserIDs

func (tu *TeamUpdate) AddUserIDs(ids ...uuid.UUID) *TeamUpdate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*TeamUpdate) AddUsers

func (tu *TeamUpdate) AddUsers(u ...*User) *TeamUpdate

AddUsers adds the "users" edges to the User entity.

func (*TeamUpdate) AddUsersTeamIDs

func (tu *TeamUpdate) AddUsersTeamIDs(ids ...int) *TeamUpdate

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by IDs.

func (*TeamUpdate) AddUsersTeams

func (tu *TeamUpdate) AddUsersTeams(u ...*UsersTeams) *TeamUpdate

AddUsersTeams adds the "users_teams" edges to the UsersTeams entity.

func (*TeamUpdate) ClearBlockedReason

func (tu *TeamUpdate) ClearBlockedReason() *TeamUpdate

ClearBlockedReason clears the value of the "blocked_reason" field.

func (*TeamUpdate) ClearEnvs

func (tu *TeamUpdate) ClearEnvs() *TeamUpdate

ClearEnvs clears all "envs" edges to the Env entity.

func (*TeamUpdate) ClearTeamAPIKeys

func (tu *TeamUpdate) ClearTeamAPIKeys() *TeamUpdate

ClearTeamAPIKeys clears all "team_api_keys" edges to the TeamAPIKey entity.

func (*TeamUpdate) ClearTeamTier

func (tu *TeamUpdate) ClearTeamTier() *TeamUpdate

ClearTeamTier clears the "team_tier" edge to the Tier entity.

func (*TeamUpdate) ClearUsers

func (tu *TeamUpdate) ClearUsers() *TeamUpdate

ClearUsers clears all "users" edges to the User entity.

func (*TeamUpdate) ClearUsersTeams

func (tu *TeamUpdate) ClearUsersTeams() *TeamUpdate

ClearUsersTeams clears all "users_teams" edges to the UsersTeams entity.

func (*TeamUpdate) Exec

func (tu *TeamUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamUpdate) ExecX

func (tu *TeamUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamUpdate) Modify

func (tu *TeamUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TeamUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TeamUpdate) Mutation

func (tu *TeamUpdate) Mutation() *TeamMutation

Mutation returns the TeamMutation object of the builder.

func (*TeamUpdate) RemoveEnvIDs

func (tu *TeamUpdate) RemoveEnvIDs(ids ...string) *TeamUpdate

RemoveEnvIDs removes the "envs" edge to Env entities by IDs.

func (*TeamUpdate) RemoveEnvs

func (tu *TeamUpdate) RemoveEnvs(e ...*Env) *TeamUpdate

RemoveEnvs removes "envs" edges to Env entities.

func (*TeamUpdate) RemoveTeamAPIKeyIDs

func (tu *TeamUpdate) RemoveTeamAPIKeyIDs(ids ...string) *TeamUpdate

RemoveTeamAPIKeyIDs removes the "team_api_keys" edge to TeamAPIKey entities by IDs.

func (*TeamUpdate) RemoveTeamAPIKeys

func (tu *TeamUpdate) RemoveTeamAPIKeys(t ...*TeamAPIKey) *TeamUpdate

RemoveTeamAPIKeys removes "team_api_keys" edges to TeamAPIKey entities.

func (*TeamUpdate) RemoveUserIDs

func (tu *TeamUpdate) RemoveUserIDs(ids ...uuid.UUID) *TeamUpdate

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*TeamUpdate) RemoveUsers

func (tu *TeamUpdate) RemoveUsers(u ...*User) *TeamUpdate

RemoveUsers removes "users" edges to User entities.

func (*TeamUpdate) RemoveUsersTeamIDs

func (tu *TeamUpdate) RemoveUsersTeamIDs(ids ...int) *TeamUpdate

RemoveUsersTeamIDs removes the "users_teams" edge to UsersTeams entities by IDs.

func (*TeamUpdate) RemoveUsersTeams

func (tu *TeamUpdate) RemoveUsersTeams(u ...*UsersTeams) *TeamUpdate

RemoveUsersTeams removes "users_teams" edges to UsersTeams entities.

func (*TeamUpdate) Save

func (tu *TeamUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TeamUpdate) SaveX

func (tu *TeamUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TeamUpdate) SetBlockedReason

func (tu *TeamUpdate) SetBlockedReason(s string) *TeamUpdate

SetBlockedReason sets the "blocked_reason" field.

func (*TeamUpdate) SetEmail

func (tu *TeamUpdate) SetEmail(s string) *TeamUpdate

SetEmail sets the "email" field.

func (*TeamUpdate) SetIsBanned

func (tu *TeamUpdate) SetIsBanned(b bool) *TeamUpdate

SetIsBanned sets the "is_banned" field.

func (*TeamUpdate) SetIsBlocked

func (tu *TeamUpdate) SetIsBlocked(b bool) *TeamUpdate

SetIsBlocked sets the "is_blocked" field.

func (*TeamUpdate) SetIsDefault

func (tu *TeamUpdate) SetIsDefault(b bool) *TeamUpdate

SetIsDefault sets the "is_default" field.

func (*TeamUpdate) SetName

func (tu *TeamUpdate) SetName(s string) *TeamUpdate

SetName sets the "name" field.

func (*TeamUpdate) SetNillableBlockedReason

func (tu *TeamUpdate) SetNillableBlockedReason(s *string) *TeamUpdate

SetNillableBlockedReason sets the "blocked_reason" field if the given value is not nil.

func (*TeamUpdate) SetNillableEmail

func (tu *TeamUpdate) SetNillableEmail(s *string) *TeamUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*TeamUpdate) SetNillableIsBanned

func (tu *TeamUpdate) SetNillableIsBanned(b *bool) *TeamUpdate

SetNillableIsBanned sets the "is_banned" field if the given value is not nil.

func (*TeamUpdate) SetNillableIsBlocked

func (tu *TeamUpdate) SetNillableIsBlocked(b *bool) *TeamUpdate

SetNillableIsBlocked sets the "is_blocked" field if the given value is not nil.

func (*TeamUpdate) SetNillableIsDefault

func (tu *TeamUpdate) SetNillableIsDefault(b *bool) *TeamUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*TeamUpdate) SetNillableName

func (tu *TeamUpdate) SetNillableName(s *string) *TeamUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*TeamUpdate) SetNillableTier

func (tu *TeamUpdate) SetNillableTier(s *string) *TeamUpdate

SetNillableTier sets the "tier" field if the given value is not nil.

func (*TeamUpdate) SetTeamTier

func (tu *TeamUpdate) SetTeamTier(t *Tier) *TeamUpdate

SetTeamTier sets the "team_tier" edge to the Tier entity.

func (*TeamUpdate) SetTeamTierID

func (tu *TeamUpdate) SetTeamTierID(id string) *TeamUpdate

SetTeamTierID sets the "team_tier" edge to the Tier entity by ID.

func (*TeamUpdate) SetTier

func (tu *TeamUpdate) SetTier(s string) *TeamUpdate

SetTier sets the "tier" field.

func (*TeamUpdate) Where

func (tu *TeamUpdate) Where(ps ...predicate.Team) *TeamUpdate

Where appends a list predicates to the TeamUpdate builder.

type TeamUpdateOne

type TeamUpdateOne struct {
	// contains filtered or unexported fields
}

TeamUpdateOne is the builder for updating a single Team entity.

func (*TeamUpdateOne) AddEnvIDs

func (tuo *TeamUpdateOne) AddEnvIDs(ids ...string) *TeamUpdateOne

AddEnvIDs adds the "envs" edge to the Env entity by IDs.

func (*TeamUpdateOne) AddEnvs

func (tuo *TeamUpdateOne) AddEnvs(e ...*Env) *TeamUpdateOne

AddEnvs adds the "envs" edges to the Env entity.

func (*TeamUpdateOne) AddTeamAPIKeyIDs

func (tuo *TeamUpdateOne) AddTeamAPIKeyIDs(ids ...string) *TeamUpdateOne

AddTeamAPIKeyIDs adds the "team_api_keys" edge to the TeamAPIKey entity by IDs.

func (*TeamUpdateOne) AddTeamAPIKeys

func (tuo *TeamUpdateOne) AddTeamAPIKeys(t ...*TeamAPIKey) *TeamUpdateOne

AddTeamAPIKeys adds the "team_api_keys" edges to the TeamAPIKey entity.

func (*TeamUpdateOne) AddUserIDs

func (tuo *TeamUpdateOne) AddUserIDs(ids ...uuid.UUID) *TeamUpdateOne

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*TeamUpdateOne) AddUsers

func (tuo *TeamUpdateOne) AddUsers(u ...*User) *TeamUpdateOne

AddUsers adds the "users" edges to the User entity.

func (*TeamUpdateOne) AddUsersTeamIDs

func (tuo *TeamUpdateOne) AddUsersTeamIDs(ids ...int) *TeamUpdateOne

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by IDs.

func (*TeamUpdateOne) AddUsersTeams

func (tuo *TeamUpdateOne) AddUsersTeams(u ...*UsersTeams) *TeamUpdateOne

AddUsersTeams adds the "users_teams" edges to the UsersTeams entity.

func (*TeamUpdateOne) ClearBlockedReason

func (tuo *TeamUpdateOne) ClearBlockedReason() *TeamUpdateOne

ClearBlockedReason clears the value of the "blocked_reason" field.

func (*TeamUpdateOne) ClearEnvs

func (tuo *TeamUpdateOne) ClearEnvs() *TeamUpdateOne

ClearEnvs clears all "envs" edges to the Env entity.

func (*TeamUpdateOne) ClearTeamAPIKeys

func (tuo *TeamUpdateOne) ClearTeamAPIKeys() *TeamUpdateOne

ClearTeamAPIKeys clears all "team_api_keys" edges to the TeamAPIKey entity.

func (*TeamUpdateOne) ClearTeamTier

func (tuo *TeamUpdateOne) ClearTeamTier() *TeamUpdateOne

ClearTeamTier clears the "team_tier" edge to the Tier entity.

func (*TeamUpdateOne) ClearUsers

func (tuo *TeamUpdateOne) ClearUsers() *TeamUpdateOne

ClearUsers clears all "users" edges to the User entity.

func (*TeamUpdateOne) ClearUsersTeams

func (tuo *TeamUpdateOne) ClearUsersTeams() *TeamUpdateOne

ClearUsersTeams clears all "users_teams" edges to the UsersTeams entity.

func (*TeamUpdateOne) Exec

func (tuo *TeamUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TeamUpdateOne) ExecX

func (tuo *TeamUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamUpdateOne) Modify

func (tuo *TeamUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TeamUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TeamUpdateOne) Mutation

func (tuo *TeamUpdateOne) Mutation() *TeamMutation

Mutation returns the TeamMutation object of the builder.

func (*TeamUpdateOne) RemoveEnvIDs

func (tuo *TeamUpdateOne) RemoveEnvIDs(ids ...string) *TeamUpdateOne

RemoveEnvIDs removes the "envs" edge to Env entities by IDs.

func (*TeamUpdateOne) RemoveEnvs

func (tuo *TeamUpdateOne) RemoveEnvs(e ...*Env) *TeamUpdateOne

RemoveEnvs removes "envs" edges to Env entities.

func (*TeamUpdateOne) RemoveTeamAPIKeyIDs

func (tuo *TeamUpdateOne) RemoveTeamAPIKeyIDs(ids ...string) *TeamUpdateOne

RemoveTeamAPIKeyIDs removes the "team_api_keys" edge to TeamAPIKey entities by IDs.

func (*TeamUpdateOne) RemoveTeamAPIKeys

func (tuo *TeamUpdateOne) RemoveTeamAPIKeys(t ...*TeamAPIKey) *TeamUpdateOne

RemoveTeamAPIKeys removes "team_api_keys" edges to TeamAPIKey entities.

func (*TeamUpdateOne) RemoveUserIDs

func (tuo *TeamUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *TeamUpdateOne

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*TeamUpdateOne) RemoveUsers

func (tuo *TeamUpdateOne) RemoveUsers(u ...*User) *TeamUpdateOne

RemoveUsers removes "users" edges to User entities.

func (*TeamUpdateOne) RemoveUsersTeamIDs

func (tuo *TeamUpdateOne) RemoveUsersTeamIDs(ids ...int) *TeamUpdateOne

RemoveUsersTeamIDs removes the "users_teams" edge to UsersTeams entities by IDs.

func (*TeamUpdateOne) RemoveUsersTeams

func (tuo *TeamUpdateOne) RemoveUsersTeams(u ...*UsersTeams) *TeamUpdateOne

RemoveUsersTeams removes "users_teams" edges to UsersTeams entities.

func (*TeamUpdateOne) Save

func (tuo *TeamUpdateOne) Save(ctx context.Context) (*Team, error)

Save executes the query and returns the updated Team entity.

func (*TeamUpdateOne) SaveX

func (tuo *TeamUpdateOne) SaveX(ctx context.Context) *Team

SaveX is like Save, but panics if an error occurs.

func (*TeamUpdateOne) Select

func (tuo *TeamUpdateOne) Select(field string, fields ...string) *TeamUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TeamUpdateOne) SetBlockedReason

func (tuo *TeamUpdateOne) SetBlockedReason(s string) *TeamUpdateOne

SetBlockedReason sets the "blocked_reason" field.

func (*TeamUpdateOne) SetEmail

func (tuo *TeamUpdateOne) SetEmail(s string) *TeamUpdateOne

SetEmail sets the "email" field.

func (*TeamUpdateOne) SetIsBanned

func (tuo *TeamUpdateOne) SetIsBanned(b bool) *TeamUpdateOne

SetIsBanned sets the "is_banned" field.

func (*TeamUpdateOne) SetIsBlocked

func (tuo *TeamUpdateOne) SetIsBlocked(b bool) *TeamUpdateOne

SetIsBlocked sets the "is_blocked" field.

func (*TeamUpdateOne) SetIsDefault

func (tuo *TeamUpdateOne) SetIsDefault(b bool) *TeamUpdateOne

SetIsDefault sets the "is_default" field.

func (*TeamUpdateOne) SetName

func (tuo *TeamUpdateOne) SetName(s string) *TeamUpdateOne

SetName sets the "name" field.

func (*TeamUpdateOne) SetNillableBlockedReason

func (tuo *TeamUpdateOne) SetNillableBlockedReason(s *string) *TeamUpdateOne

SetNillableBlockedReason sets the "blocked_reason" field if the given value is not nil.

func (*TeamUpdateOne) SetNillableEmail

func (tuo *TeamUpdateOne) SetNillableEmail(s *string) *TeamUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*TeamUpdateOne) SetNillableIsBanned

func (tuo *TeamUpdateOne) SetNillableIsBanned(b *bool) *TeamUpdateOne

SetNillableIsBanned sets the "is_banned" field if the given value is not nil.

func (*TeamUpdateOne) SetNillableIsBlocked

func (tuo *TeamUpdateOne) SetNillableIsBlocked(b *bool) *TeamUpdateOne

SetNillableIsBlocked sets the "is_blocked" field if the given value is not nil.

func (*TeamUpdateOne) SetNillableIsDefault

func (tuo *TeamUpdateOne) SetNillableIsDefault(b *bool) *TeamUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*TeamUpdateOne) SetNillableName

func (tuo *TeamUpdateOne) SetNillableName(s *string) *TeamUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*TeamUpdateOne) SetNillableTier

func (tuo *TeamUpdateOne) SetNillableTier(s *string) *TeamUpdateOne

SetNillableTier sets the "tier" field if the given value is not nil.

func (*TeamUpdateOne) SetTeamTier

func (tuo *TeamUpdateOne) SetTeamTier(t *Tier) *TeamUpdateOne

SetTeamTier sets the "team_tier" edge to the Tier entity.

func (*TeamUpdateOne) SetTeamTierID

func (tuo *TeamUpdateOne) SetTeamTierID(id string) *TeamUpdateOne

SetTeamTierID sets the "team_tier" edge to the Tier entity by ID.

func (*TeamUpdateOne) SetTier

func (tuo *TeamUpdateOne) SetTier(s string) *TeamUpdateOne

SetTier sets the "tier" field.

func (*TeamUpdateOne) Where

func (tuo *TeamUpdateOne) Where(ps ...predicate.Team) *TeamUpdateOne

Where appends a list predicates to the TeamUpdate builder.

type TeamUpsert

type TeamUpsert struct {
	*sql.UpdateSet
}

TeamUpsert is the "OnConflict" setter.

func (*TeamUpsert) ClearBlockedReason

func (u *TeamUpsert) ClearBlockedReason() *TeamUpsert

ClearBlockedReason clears the value of the "blocked_reason" field.

func (*TeamUpsert) SetBlockedReason

func (u *TeamUpsert) SetBlockedReason(v string) *TeamUpsert

SetBlockedReason sets the "blocked_reason" field.

func (*TeamUpsert) SetEmail

func (u *TeamUpsert) SetEmail(v string) *TeamUpsert

SetEmail sets the "email" field.

func (*TeamUpsert) SetIsBanned

func (u *TeamUpsert) SetIsBanned(v bool) *TeamUpsert

SetIsBanned sets the "is_banned" field.

func (*TeamUpsert) SetIsBlocked

func (u *TeamUpsert) SetIsBlocked(v bool) *TeamUpsert

SetIsBlocked sets the "is_blocked" field.

func (*TeamUpsert) SetIsDefault

func (u *TeamUpsert) SetIsDefault(v bool) *TeamUpsert

SetIsDefault sets the "is_default" field.

func (*TeamUpsert) SetName

func (u *TeamUpsert) SetName(v string) *TeamUpsert

SetName sets the "name" field.

func (*TeamUpsert) SetTier

func (u *TeamUpsert) SetTier(v string) *TeamUpsert

SetTier sets the "tier" field.

func (*TeamUpsert) UpdateBlockedReason

func (u *TeamUpsert) UpdateBlockedReason() *TeamUpsert

UpdateBlockedReason sets the "blocked_reason" field to the value that was provided on create.

func (*TeamUpsert) UpdateEmail

func (u *TeamUpsert) UpdateEmail() *TeamUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*TeamUpsert) UpdateIsBanned

func (u *TeamUpsert) UpdateIsBanned() *TeamUpsert

UpdateIsBanned sets the "is_banned" field to the value that was provided on create.

func (*TeamUpsert) UpdateIsBlocked

func (u *TeamUpsert) UpdateIsBlocked() *TeamUpsert

UpdateIsBlocked sets the "is_blocked" field to the value that was provided on create.

func (*TeamUpsert) UpdateIsDefault

func (u *TeamUpsert) UpdateIsDefault() *TeamUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*TeamUpsert) UpdateName

func (u *TeamUpsert) UpdateName() *TeamUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*TeamUpsert) UpdateTier

func (u *TeamUpsert) UpdateTier() *TeamUpsert

UpdateTier sets the "tier" field to the value that was provided on create.

type TeamUpsertBulk

type TeamUpsertBulk struct {
	// contains filtered or unexported fields
}

TeamUpsertBulk is the builder for "upsert"-ing a bulk of Team nodes.

func (*TeamUpsertBulk) ClearBlockedReason

func (u *TeamUpsertBulk) ClearBlockedReason() *TeamUpsertBulk

ClearBlockedReason clears the value of the "blocked_reason" field.

func (*TeamUpsertBulk) DoNothing

func (u *TeamUpsertBulk) DoNothing() *TeamUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TeamUpsertBulk) Exec

func (u *TeamUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamUpsertBulk) ExecX

func (u *TeamUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamUpsertBulk) Ignore

func (u *TeamUpsertBulk) Ignore() *TeamUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Team.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TeamUpsertBulk) SetBlockedReason

func (u *TeamUpsertBulk) SetBlockedReason(v string) *TeamUpsertBulk

SetBlockedReason sets the "blocked_reason" field.

func (*TeamUpsertBulk) SetEmail

func (u *TeamUpsertBulk) SetEmail(v string) *TeamUpsertBulk

SetEmail sets the "email" field.

func (*TeamUpsertBulk) SetIsBanned

func (u *TeamUpsertBulk) SetIsBanned(v bool) *TeamUpsertBulk

SetIsBanned sets the "is_banned" field.

func (*TeamUpsertBulk) SetIsBlocked

func (u *TeamUpsertBulk) SetIsBlocked(v bool) *TeamUpsertBulk

SetIsBlocked sets the "is_blocked" field.

func (*TeamUpsertBulk) SetIsDefault

func (u *TeamUpsertBulk) SetIsDefault(v bool) *TeamUpsertBulk

SetIsDefault sets the "is_default" field.

func (*TeamUpsertBulk) SetName

func (u *TeamUpsertBulk) SetName(v string) *TeamUpsertBulk

SetName sets the "name" field.

func (*TeamUpsertBulk) SetTier

func (u *TeamUpsertBulk) SetTier(v string) *TeamUpsertBulk

SetTier sets the "tier" field.

func (*TeamUpsertBulk) Update

func (u *TeamUpsertBulk) Update(set func(*TeamUpsert)) *TeamUpsertBulk

Update allows overriding fields `UPDATE` values. See the TeamCreateBulk.OnConflict documentation for more info.

func (*TeamUpsertBulk) UpdateBlockedReason

func (u *TeamUpsertBulk) UpdateBlockedReason() *TeamUpsertBulk

UpdateBlockedReason sets the "blocked_reason" field to the value that was provided on create.

func (*TeamUpsertBulk) UpdateEmail

func (u *TeamUpsertBulk) UpdateEmail() *TeamUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*TeamUpsertBulk) UpdateIsBanned

func (u *TeamUpsertBulk) UpdateIsBanned() *TeamUpsertBulk

UpdateIsBanned sets the "is_banned" field to the value that was provided on create.

func (*TeamUpsertBulk) UpdateIsBlocked

func (u *TeamUpsertBulk) UpdateIsBlocked() *TeamUpsertBulk

UpdateIsBlocked sets the "is_blocked" field to the value that was provided on create.

func (*TeamUpsertBulk) UpdateIsDefault

func (u *TeamUpsertBulk) UpdateIsDefault() *TeamUpsertBulk

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*TeamUpsertBulk) UpdateName

func (u *TeamUpsertBulk) UpdateName() *TeamUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*TeamUpsertBulk) UpdateNewValues

func (u *TeamUpsertBulk) UpdateNewValues() *TeamUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Team.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(team.FieldID)
		}),
	).
	Exec(ctx)

func (*TeamUpsertBulk) UpdateTier

func (u *TeamUpsertBulk) UpdateTier() *TeamUpsertBulk

UpdateTier sets the "tier" field to the value that was provided on create.

type TeamUpsertOne

type TeamUpsertOne struct {
	// contains filtered or unexported fields
}

TeamUpsertOne is the builder for "upsert"-ing

one Team node.

func (*TeamUpsertOne) ClearBlockedReason

func (u *TeamUpsertOne) ClearBlockedReason() *TeamUpsertOne

ClearBlockedReason clears the value of the "blocked_reason" field.

func (*TeamUpsertOne) DoNothing

func (u *TeamUpsertOne) DoNothing() *TeamUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TeamUpsertOne) Exec

func (u *TeamUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TeamUpsertOne) ExecX

func (u *TeamUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TeamUpsertOne) ID

func (u *TeamUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TeamUpsertOne) IDX

func (u *TeamUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*TeamUpsertOne) Ignore

func (u *TeamUpsertOne) Ignore() *TeamUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Team.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TeamUpsertOne) SetBlockedReason

func (u *TeamUpsertOne) SetBlockedReason(v string) *TeamUpsertOne

SetBlockedReason sets the "blocked_reason" field.

func (*TeamUpsertOne) SetEmail

func (u *TeamUpsertOne) SetEmail(v string) *TeamUpsertOne

SetEmail sets the "email" field.

func (*TeamUpsertOne) SetIsBanned

func (u *TeamUpsertOne) SetIsBanned(v bool) *TeamUpsertOne

SetIsBanned sets the "is_banned" field.

func (*TeamUpsertOne) SetIsBlocked

func (u *TeamUpsertOne) SetIsBlocked(v bool) *TeamUpsertOne

SetIsBlocked sets the "is_blocked" field.

func (*TeamUpsertOne) SetIsDefault

func (u *TeamUpsertOne) SetIsDefault(v bool) *TeamUpsertOne

SetIsDefault sets the "is_default" field.

func (*TeamUpsertOne) SetName

func (u *TeamUpsertOne) SetName(v string) *TeamUpsertOne

SetName sets the "name" field.

func (*TeamUpsertOne) SetTier

func (u *TeamUpsertOne) SetTier(v string) *TeamUpsertOne

SetTier sets the "tier" field.

func (*TeamUpsertOne) Update

func (u *TeamUpsertOne) Update(set func(*TeamUpsert)) *TeamUpsertOne

Update allows overriding fields `UPDATE` values. See the TeamCreate.OnConflict documentation for more info.

func (*TeamUpsertOne) UpdateBlockedReason

func (u *TeamUpsertOne) UpdateBlockedReason() *TeamUpsertOne

UpdateBlockedReason sets the "blocked_reason" field to the value that was provided on create.

func (*TeamUpsertOne) UpdateEmail

func (u *TeamUpsertOne) UpdateEmail() *TeamUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*TeamUpsertOne) UpdateIsBanned

func (u *TeamUpsertOne) UpdateIsBanned() *TeamUpsertOne

UpdateIsBanned sets the "is_banned" field to the value that was provided on create.

func (*TeamUpsertOne) UpdateIsBlocked

func (u *TeamUpsertOne) UpdateIsBlocked() *TeamUpsertOne

UpdateIsBlocked sets the "is_blocked" field to the value that was provided on create.

func (*TeamUpsertOne) UpdateIsDefault

func (u *TeamUpsertOne) UpdateIsDefault() *TeamUpsertOne

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*TeamUpsertOne) UpdateName

func (u *TeamUpsertOne) UpdateName() *TeamUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*TeamUpsertOne) UpdateNewValues

func (u *TeamUpsertOne) UpdateNewValues() *TeamUpsertOne

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.Team.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(team.FieldID)
		}),
	).
	Exec(ctx)

func (*TeamUpsertOne) UpdateTier

func (u *TeamUpsertOne) UpdateTier() *TeamUpsertOne

UpdateTier sets the "tier" field to the value that was provided on create.

type Teams

type Teams []*Team

Teams is a parsable slice of Team.

type Tier

type Tier struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// DiskMB holds the value of the "disk_mb" field.
	DiskMB int64 `json:"disk_mb,omitempty"`
	// The number of instances the team can run concurrently
	ConcurrentInstances int64 `json:"concurrent_instances,omitempty"`
	// MaxLengthHours holds the value of the "max_length_hours" field.
	MaxLengthHours int64 `json:"max_length_hours,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TierQuery when eager-loading is set.
	Edges TierEdges `json:"edges"`
	// contains filtered or unexported fields
}

Tier is the model entity for the Tier schema.

func (*Tier) QueryTeams

func (t *Tier) QueryTeams() *TeamQuery

QueryTeams queries the "teams" edge of the Tier entity.

func (*Tier) String

func (t *Tier) String() string

String implements the fmt.Stringer.

func (*Tier) Unwrap

func (t *Tier) Unwrap() *Tier

Unwrap unwraps the Tier 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 (*Tier) Update

func (t *Tier) Update() *TierUpdateOne

Update returns a builder for updating this Tier. Note that you need to call Tier.Unwrap() before calling this method if this Tier was returned from a transaction, and the transaction was committed or rolled back.

func (*Tier) Value

func (t *Tier) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Tier. This includes values selected through modifiers, order, etc.

type TierClient

type TierClient struct {
	// contains filtered or unexported fields
}

TierClient is a client for the Tier schema.

func NewTierClient

func NewTierClient(c config) *TierClient

NewTierClient returns a client for the Tier from the given config.

func (*TierClient) Create

func (c *TierClient) Create() *TierCreate

Create returns a builder for creating a Tier entity.

func (*TierClient) CreateBulk

func (c *TierClient) CreateBulk(builders ...*TierCreate) *TierCreateBulk

CreateBulk returns a builder for creating a bulk of Tier entities.

func (*TierClient) Delete

func (c *TierClient) Delete() *TierDelete

Delete returns a delete builder for Tier.

func (*TierClient) DeleteOne

func (c *TierClient) DeleteOne(t *Tier) *TierDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TierClient) DeleteOneID

func (c *TierClient) DeleteOneID(id string) *TierDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TierClient) Get

func (c *TierClient) Get(ctx context.Context, id string) (*Tier, error)

Get returns a Tier entity by its id.

func (*TierClient) GetX

func (c *TierClient) GetX(ctx context.Context, id string) *Tier

GetX is like Get, but panics if an error occurs.

func (*TierClient) Hooks

func (c *TierClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TierClient) Intercept

func (c *TierClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tier.Intercept(f(g(h())))`.

func (*TierClient) Interceptors

func (c *TierClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TierClient) MapCreateBulk

func (c *TierClient) MapCreateBulk(slice any, setFunc func(*TierCreate, int)) *TierCreateBulk

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 (*TierClient) Query

func (c *TierClient) Query() *TierQuery

Query returns a query builder for Tier.

func (*TierClient) QueryTeams

func (c *TierClient) QueryTeams(t *Tier) *TeamQuery

QueryTeams queries the teams edge of a Tier.

func (*TierClient) Update

func (c *TierClient) Update() *TierUpdate

Update returns an update builder for Tier.

func (*TierClient) UpdateOne

func (c *TierClient) UpdateOne(t *Tier) *TierUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TierClient) UpdateOneID

func (c *TierClient) UpdateOneID(id string) *TierUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TierClient) Use

func (c *TierClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tier.Hooks(f(g(h())))`.

type TierCreate

type TierCreate struct {
	// contains filtered or unexported fields
}

TierCreate is the builder for creating a Tier entity.

func (*TierCreate) AddTeamIDs

func (tc *TierCreate) AddTeamIDs(ids ...uuid.UUID) *TierCreate

AddTeamIDs adds the "teams" edge to the Team entity by IDs.

func (*TierCreate) AddTeams

func (tc *TierCreate) AddTeams(t ...*Team) *TierCreate

AddTeams adds the "teams" edges to the Team entity.

func (*TierCreate) Exec

func (tc *TierCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TierCreate) ExecX

func (tc *TierCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TierCreate) Mutation

func (tc *TierCreate) Mutation() *TierMutation

Mutation returns the TierMutation object of the builder.

func (*TierCreate) OnConflict

func (tc *TierCreate) OnConflict(opts ...sql.ConflictOption) *TierUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Tier.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.TierUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TierCreate) OnConflictColumns

func (tc *TierCreate) OnConflictColumns(columns ...string) *TierUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Tier.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TierCreate) Save

func (tc *TierCreate) Save(ctx context.Context) (*Tier, error)

Save creates the Tier in the database.

func (*TierCreate) SaveX

func (tc *TierCreate) SaveX(ctx context.Context) *Tier

SaveX calls Save and panics if Save returns an error.

func (*TierCreate) SetConcurrentInstances

func (tc *TierCreate) SetConcurrentInstances(i int64) *TierCreate

SetConcurrentInstances sets the "concurrent_instances" field.

func (*TierCreate) SetDiskMB

func (tc *TierCreate) SetDiskMB(i int64) *TierCreate

SetDiskMB sets the "disk_mb" field.

func (*TierCreate) SetID

func (tc *TierCreate) SetID(s string) *TierCreate

SetID sets the "id" field.

func (*TierCreate) SetMaxLengthHours

func (tc *TierCreate) SetMaxLengthHours(i int64) *TierCreate

SetMaxLengthHours sets the "max_length_hours" field.

func (*TierCreate) SetName

func (tc *TierCreate) SetName(s string) *TierCreate

SetName sets the "name" field.

type TierCreateBulk

type TierCreateBulk struct {
	// contains filtered or unexported fields
}

TierCreateBulk is the builder for creating many Tier entities in bulk.

func (*TierCreateBulk) Exec

func (tcb *TierCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TierCreateBulk) ExecX

func (tcb *TierCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TierCreateBulk) OnConflict

func (tcb *TierCreateBulk) OnConflict(opts ...sql.ConflictOption) *TierUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Tier.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.TierUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TierCreateBulk) OnConflictColumns

func (tcb *TierCreateBulk) OnConflictColumns(columns ...string) *TierUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Tier.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TierCreateBulk) Save

func (tcb *TierCreateBulk) Save(ctx context.Context) ([]*Tier, error)

Save creates the Tier entities in the database.

func (*TierCreateBulk) SaveX

func (tcb *TierCreateBulk) SaveX(ctx context.Context) []*Tier

SaveX is like Save, but panics if an error occurs.

type TierDelete

type TierDelete struct {
	// contains filtered or unexported fields
}

TierDelete is the builder for deleting a Tier entity.

func (*TierDelete) Exec

func (td *TierDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TierDelete) ExecX

func (td *TierDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TierDelete) Where

func (td *TierDelete) Where(ps ...predicate.Tier) *TierDelete

Where appends a list predicates to the TierDelete builder.

type TierDeleteOne

type TierDeleteOne struct {
	// contains filtered or unexported fields
}

TierDeleteOne is the builder for deleting a single Tier entity.

func (*TierDeleteOne) Exec

func (tdo *TierDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TierDeleteOne) ExecX

func (tdo *TierDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TierDeleteOne) Where

func (tdo *TierDeleteOne) Where(ps ...predicate.Tier) *TierDeleteOne

Where appends a list predicates to the TierDelete builder.

type TierEdges

type TierEdges struct {
	// Teams holds the value of the teams edge.
	Teams []*Team `json:"teams,omitempty"`
	// contains filtered or unexported fields
}

TierEdges holds the relations/edges for other nodes in the graph.

func (TierEdges) TeamsOrErr

func (e TierEdges) TeamsOrErr() ([]*Team, error)

TeamsOrErr returns the Teams value or an error if the edge was not loaded in eager-loading.

type TierGroupBy

type TierGroupBy struct {
	// contains filtered or unexported fields
}

TierGroupBy is the group-by builder for Tier entities.

func (*TierGroupBy) Aggregate

func (tgb *TierGroupBy) Aggregate(fns ...AggregateFunc) *TierGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TierGroupBy) Bool

func (s *TierGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) BoolX

func (s *TierGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TierGroupBy) Bools

func (s *TierGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) BoolsX

func (s *TierGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TierGroupBy) Float64

func (s *TierGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) Float64X

func (s *TierGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TierGroupBy) Float64s

func (s *TierGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) Float64sX

func (s *TierGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TierGroupBy) Int

func (s *TierGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) IntX

func (s *TierGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TierGroupBy) Ints

func (s *TierGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) IntsX

func (s *TierGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TierGroupBy) Scan

func (tgb *TierGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TierGroupBy) ScanX

func (s *TierGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TierGroupBy) String

func (s *TierGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) StringX

func (s *TierGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TierGroupBy) Strings

func (s *TierGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TierGroupBy) StringsX

func (s *TierGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TierMutation

type TierMutation struct {
	// contains filtered or unexported fields
}

TierMutation represents an operation that mutates the Tier nodes in the graph.

func (*TierMutation) AddConcurrentInstances

func (m *TierMutation) AddConcurrentInstances(i int64)

AddConcurrentInstances adds i to the "concurrent_instances" field.

func (*TierMutation) AddDiskMB

func (m *TierMutation) AddDiskMB(i int64)

AddDiskMB adds i to the "disk_mb" field.

func (*TierMutation) AddField

func (m *TierMutation) 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 (*TierMutation) AddMaxLengthHours

func (m *TierMutation) AddMaxLengthHours(i int64)

AddMaxLengthHours adds i to the "max_length_hours" field.

func (*TierMutation) AddTeamIDs

func (m *TierMutation) AddTeamIDs(ids ...uuid.UUID)

AddTeamIDs adds the "teams" edge to the Team entity by ids.

func (*TierMutation) AddedConcurrentInstances

func (m *TierMutation) AddedConcurrentInstances() (r int64, exists bool)

AddedConcurrentInstances returns the value that was added to the "concurrent_instances" field in this mutation.

func (*TierMutation) AddedDiskMB

func (m *TierMutation) AddedDiskMB() (r int64, exists bool)

AddedDiskMB returns the value that was added to the "disk_mb" field in this mutation.

func (*TierMutation) AddedEdges

func (m *TierMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TierMutation) AddedField

func (m *TierMutation) 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 (*TierMutation) AddedFields

func (m *TierMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TierMutation) AddedIDs

func (m *TierMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TierMutation) AddedMaxLengthHours

func (m *TierMutation) AddedMaxLengthHours() (r int64, exists bool)

AddedMaxLengthHours returns the value that was added to the "max_length_hours" field in this mutation.

func (*TierMutation) ClearEdge

func (m *TierMutation) 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 (*TierMutation) ClearField

func (m *TierMutation) 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 (*TierMutation) ClearTeams

func (m *TierMutation) ClearTeams()

ClearTeams clears the "teams" edge to the Team entity.

func (*TierMutation) ClearedEdges

func (m *TierMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TierMutation) ClearedFields

func (m *TierMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TierMutation) Client

func (m TierMutation) 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 (*TierMutation) ConcurrentInstances

func (m *TierMutation) ConcurrentInstances() (r int64, exists bool)

ConcurrentInstances returns the value of the "concurrent_instances" field in the mutation.

func (*TierMutation) DiskMB

func (m *TierMutation) DiskMB() (r int64, exists bool)

DiskMB returns the value of the "disk_mb" field in the mutation.

func (*TierMutation) EdgeCleared

func (m *TierMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TierMutation) Field

func (m *TierMutation) 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 (*TierMutation) FieldCleared

func (m *TierMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TierMutation) Fields

func (m *TierMutation) 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 (*TierMutation) ID

func (m *TierMutation) 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 (*TierMutation) IDs

func (m *TierMutation) 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 (*TierMutation) MaxLengthHours

func (m *TierMutation) MaxLengthHours() (r int64, exists bool)

MaxLengthHours returns the value of the "max_length_hours" field in the mutation.

func (*TierMutation) Name

func (m *TierMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TierMutation) OldConcurrentInstances

func (m *TierMutation) OldConcurrentInstances(ctx context.Context) (v int64, err error)

OldConcurrentInstances returns the old "concurrent_instances" field's value of the Tier entity. If the Tier 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 (*TierMutation) OldDiskMB

func (m *TierMutation) OldDiskMB(ctx context.Context) (v int64, err error)

OldDiskMB returns the old "disk_mb" field's value of the Tier entity. If the Tier 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 (*TierMutation) OldField

func (m *TierMutation) 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 (*TierMutation) OldMaxLengthHours

func (m *TierMutation) OldMaxLengthHours(ctx context.Context) (v int64, err error)

OldMaxLengthHours returns the old "max_length_hours" field's value of the Tier entity. If the Tier 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 (*TierMutation) OldName

func (m *TierMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Tier entity. If the Tier 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 (*TierMutation) Op

func (m *TierMutation) Op() Op

Op returns the operation name.

func (*TierMutation) RemoveTeamIDs

func (m *TierMutation) RemoveTeamIDs(ids ...uuid.UUID)

RemoveTeamIDs removes the "teams" edge to the Team entity by IDs.

func (*TierMutation) RemovedEdges

func (m *TierMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TierMutation) RemovedIDs

func (m *TierMutation) 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 (*TierMutation) RemovedTeamsIDs

func (m *TierMutation) RemovedTeamsIDs() (ids []uuid.UUID)

RemovedTeams returns the removed IDs of the "teams" edge to the Team entity.

func (*TierMutation) ResetConcurrentInstances

func (m *TierMutation) ResetConcurrentInstances()

ResetConcurrentInstances resets all changes to the "concurrent_instances" field.

func (*TierMutation) ResetDiskMB

func (m *TierMutation) ResetDiskMB()

ResetDiskMB resets all changes to the "disk_mb" field.

func (*TierMutation) ResetEdge

func (m *TierMutation) 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 (*TierMutation) ResetField

func (m *TierMutation) 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 (*TierMutation) ResetMaxLengthHours

func (m *TierMutation) ResetMaxLengthHours()

ResetMaxLengthHours resets all changes to the "max_length_hours" field.

func (*TierMutation) ResetName

func (m *TierMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TierMutation) ResetTeams

func (m *TierMutation) ResetTeams()

ResetTeams resets all changes to the "teams" edge.

func (*TierMutation) SetConcurrentInstances

func (m *TierMutation) SetConcurrentInstances(i int64)

SetConcurrentInstances sets the "concurrent_instances" field.

func (*TierMutation) SetDiskMB

func (m *TierMutation) SetDiskMB(i int64)

SetDiskMB sets the "disk_mb" field.

func (*TierMutation) SetField

func (m *TierMutation) 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 (*TierMutation) SetID

func (m *TierMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Tier entities.

func (*TierMutation) SetMaxLengthHours

func (m *TierMutation) SetMaxLengthHours(i int64)

SetMaxLengthHours sets the "max_length_hours" field.

func (*TierMutation) SetName

func (m *TierMutation) SetName(s string)

SetName sets the "name" field.

func (*TierMutation) SetOp

func (m *TierMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TierMutation) TeamsCleared

func (m *TierMutation) TeamsCleared() bool

TeamsCleared reports if the "teams" edge to the Team entity was cleared.

func (*TierMutation) TeamsIDs

func (m *TierMutation) TeamsIDs() (ids []uuid.UUID)

TeamsIDs returns the "teams" edge IDs in the mutation.

func (TierMutation) Tx

func (m TierMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TierMutation) Type

func (m *TierMutation) Type() string

Type returns the node type of this mutation (Tier).

func (*TierMutation) Where

func (m *TierMutation) Where(ps ...predicate.Tier)

Where appends a list predicates to the TierMutation builder.

func (*TierMutation) WhereP

func (m *TierMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TierMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TierQuery

type TierQuery struct {
	// contains filtered or unexported fields
}

TierQuery is the builder for querying Tier entities.

func (*TierQuery) Aggregate

func (tq *TierQuery) Aggregate(fns ...AggregateFunc) *TierSelect

Aggregate returns a TierSelect configured with the given aggregations.

func (*TierQuery) All

func (tq *TierQuery) All(ctx context.Context) ([]*Tier, error)

All executes the query and returns a list of Tiers.

func (*TierQuery) AllX

func (tq *TierQuery) AllX(ctx context.Context) []*Tier

AllX is like All, but panics if an error occurs.

func (*TierQuery) Clone

func (tq *TierQuery) Clone() *TierQuery

Clone returns a duplicate of the TierQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TierQuery) Count

func (tq *TierQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TierQuery) CountX

func (tq *TierQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TierQuery) Exist

func (tq *TierQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TierQuery) ExistX

func (tq *TierQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TierQuery) First

func (tq *TierQuery) First(ctx context.Context) (*Tier, error)

First returns the first Tier entity from the query. Returns a *NotFoundError when no Tier was found.

func (*TierQuery) FirstID

func (tq *TierQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Tier ID from the query. Returns a *NotFoundError when no Tier ID was found.

func (*TierQuery) FirstIDX

func (tq *TierQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*TierQuery) FirstX

func (tq *TierQuery) FirstX(ctx context.Context) *Tier

FirstX is like First, but panics if an error occurs.

func (*TierQuery) GroupBy

func (tq *TierQuery) GroupBy(field string, fields ...string) *TierGroupBy

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.Tier.Query().
	GroupBy(tier.FieldName).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*TierQuery) IDs

func (tq *TierQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of Tier IDs.

func (*TierQuery) IDsX

func (tq *TierQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*TierQuery) Limit

func (tq *TierQuery) Limit(limit int) *TierQuery

Limit the number of records to be returned by this query.

func (*TierQuery) Modify

func (tq *TierQuery) Modify(modifiers ...func(s *sql.Selector)) *TierSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TierQuery) Offset

func (tq *TierQuery) Offset(offset int) *TierQuery

Offset to start from.

func (*TierQuery) Only

func (tq *TierQuery) Only(ctx context.Context) (*Tier, error)

Only returns a single Tier entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tier entity is found. Returns a *NotFoundError when no Tier entities are found.

func (*TierQuery) OnlyID

func (tq *TierQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Tier ID in the query. Returns a *NotSingularError when more than one Tier ID is found. Returns a *NotFoundError when no entities are found.

func (*TierQuery) OnlyIDX

func (tq *TierQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TierQuery) OnlyX

func (tq *TierQuery) OnlyX(ctx context.Context) *Tier

OnlyX is like Only, but panics if an error occurs.

func (*TierQuery) Order

func (tq *TierQuery) Order(o ...tier.OrderOption) *TierQuery

Order specifies how the records should be ordered.

func (*TierQuery) QueryTeams

func (tq *TierQuery) QueryTeams() *TeamQuery

QueryTeams chains the current query on the "teams" edge.

func (*TierQuery) Select

func (tq *TierQuery) Select(fields ...string) *TierSelect

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.Tier.Query().
	Select(tier.FieldName).
	Scan(ctx, &v)

func (*TierQuery) Unique

func (tq *TierQuery) Unique(unique bool) *TierQuery

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 (*TierQuery) Where

func (tq *TierQuery) Where(ps ...predicate.Tier) *TierQuery

Where adds a new predicate for the TierQuery builder.

func (*TierQuery) WithTeams

func (tq *TierQuery) WithTeams(opts ...func(*TeamQuery)) *TierQuery

WithTeams tells the query-builder to eager-load the nodes that are connected to the "teams" edge. The optional arguments are used to configure the query builder of the edge.

type TierSelect

type TierSelect struct {
	*TierQuery
	// contains filtered or unexported fields
}

TierSelect is the builder for selecting fields of Tier entities.

func (*TierSelect) Aggregate

func (ts *TierSelect) Aggregate(fns ...AggregateFunc) *TierSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TierSelect) Bool

func (s *TierSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TierSelect) BoolX

func (s *TierSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TierSelect) Bools

func (s *TierSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TierSelect) BoolsX

func (s *TierSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TierSelect) Float64

func (s *TierSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TierSelect) Float64X

func (s *TierSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TierSelect) Float64s

func (s *TierSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TierSelect) Float64sX

func (s *TierSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TierSelect) Int

func (s *TierSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TierSelect) IntX

func (s *TierSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TierSelect) Ints

func (s *TierSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TierSelect) IntsX

func (s *TierSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TierSelect) Modify

func (ts *TierSelect) Modify(modifiers ...func(s *sql.Selector)) *TierSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TierSelect) Scan

func (ts *TierSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TierSelect) ScanX

func (s *TierSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TierSelect) String

func (s *TierSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TierSelect) StringX

func (s *TierSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TierSelect) Strings

func (s *TierSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TierSelect) StringsX

func (s *TierSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TierUpdate

type TierUpdate struct {
	// contains filtered or unexported fields
}

TierUpdate is the builder for updating Tier entities.

func (*TierUpdate) AddConcurrentInstances

func (tu *TierUpdate) AddConcurrentInstances(i int64) *TierUpdate

AddConcurrentInstances adds i to the "concurrent_instances" field.

func (*TierUpdate) AddDiskMB

func (tu *TierUpdate) AddDiskMB(i int64) *TierUpdate

AddDiskMB adds i to the "disk_mb" field.

func (*TierUpdate) AddMaxLengthHours

func (tu *TierUpdate) AddMaxLengthHours(i int64) *TierUpdate

AddMaxLengthHours adds i to the "max_length_hours" field.

func (*TierUpdate) AddTeamIDs

func (tu *TierUpdate) AddTeamIDs(ids ...uuid.UUID) *TierUpdate

AddTeamIDs adds the "teams" edge to the Team entity by IDs.

func (*TierUpdate) AddTeams

func (tu *TierUpdate) AddTeams(t ...*Team) *TierUpdate

AddTeams adds the "teams" edges to the Team entity.

func (*TierUpdate) ClearTeams

func (tu *TierUpdate) ClearTeams() *TierUpdate

ClearTeams clears all "teams" edges to the Team entity.

func (*TierUpdate) Exec

func (tu *TierUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TierUpdate) ExecX

func (tu *TierUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TierUpdate) Modify

func (tu *TierUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TierUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TierUpdate) Mutation

func (tu *TierUpdate) Mutation() *TierMutation

Mutation returns the TierMutation object of the builder.

func (*TierUpdate) RemoveTeamIDs

func (tu *TierUpdate) RemoveTeamIDs(ids ...uuid.UUID) *TierUpdate

RemoveTeamIDs removes the "teams" edge to Team entities by IDs.

func (*TierUpdate) RemoveTeams

func (tu *TierUpdate) RemoveTeams(t ...*Team) *TierUpdate

RemoveTeams removes "teams" edges to Team entities.

func (*TierUpdate) Save

func (tu *TierUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TierUpdate) SaveX

func (tu *TierUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TierUpdate) SetConcurrentInstances

func (tu *TierUpdate) SetConcurrentInstances(i int64) *TierUpdate

SetConcurrentInstances sets the "concurrent_instances" field.

func (*TierUpdate) SetDiskMB

func (tu *TierUpdate) SetDiskMB(i int64) *TierUpdate

SetDiskMB sets the "disk_mb" field.

func (*TierUpdate) SetMaxLengthHours

func (tu *TierUpdate) SetMaxLengthHours(i int64) *TierUpdate

SetMaxLengthHours sets the "max_length_hours" field.

func (*TierUpdate) SetName

func (tu *TierUpdate) SetName(s string) *TierUpdate

SetName sets the "name" field.

func (*TierUpdate) SetNillableConcurrentInstances

func (tu *TierUpdate) SetNillableConcurrentInstances(i *int64) *TierUpdate

SetNillableConcurrentInstances sets the "concurrent_instances" field if the given value is not nil.

func (*TierUpdate) SetNillableDiskMB

func (tu *TierUpdate) SetNillableDiskMB(i *int64) *TierUpdate

SetNillableDiskMB sets the "disk_mb" field if the given value is not nil.

func (*TierUpdate) SetNillableMaxLengthHours

func (tu *TierUpdate) SetNillableMaxLengthHours(i *int64) *TierUpdate

SetNillableMaxLengthHours sets the "max_length_hours" field if the given value is not nil.

func (*TierUpdate) SetNillableName

func (tu *TierUpdate) SetNillableName(s *string) *TierUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*TierUpdate) Where

func (tu *TierUpdate) Where(ps ...predicate.Tier) *TierUpdate

Where appends a list predicates to the TierUpdate builder.

type TierUpdateOne

type TierUpdateOne struct {
	// contains filtered or unexported fields
}

TierUpdateOne is the builder for updating a single Tier entity.

func (*TierUpdateOne) AddConcurrentInstances

func (tuo *TierUpdateOne) AddConcurrentInstances(i int64) *TierUpdateOne

AddConcurrentInstances adds i to the "concurrent_instances" field.

func (*TierUpdateOne) AddDiskMB

func (tuo *TierUpdateOne) AddDiskMB(i int64) *TierUpdateOne

AddDiskMB adds i to the "disk_mb" field.

func (*TierUpdateOne) AddMaxLengthHours

func (tuo *TierUpdateOne) AddMaxLengthHours(i int64) *TierUpdateOne

AddMaxLengthHours adds i to the "max_length_hours" field.

func (*TierUpdateOne) AddTeamIDs

func (tuo *TierUpdateOne) AddTeamIDs(ids ...uuid.UUID) *TierUpdateOne

AddTeamIDs adds the "teams" edge to the Team entity by IDs.

func (*TierUpdateOne) AddTeams

func (tuo *TierUpdateOne) AddTeams(t ...*Team) *TierUpdateOne

AddTeams adds the "teams" edges to the Team entity.

func (*TierUpdateOne) ClearTeams

func (tuo *TierUpdateOne) ClearTeams() *TierUpdateOne

ClearTeams clears all "teams" edges to the Team entity.

func (*TierUpdateOne) Exec

func (tuo *TierUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TierUpdateOne) ExecX

func (tuo *TierUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TierUpdateOne) Modify

func (tuo *TierUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TierUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TierUpdateOne) Mutation

func (tuo *TierUpdateOne) Mutation() *TierMutation

Mutation returns the TierMutation object of the builder.

func (*TierUpdateOne) RemoveTeamIDs

func (tuo *TierUpdateOne) RemoveTeamIDs(ids ...uuid.UUID) *TierUpdateOne

RemoveTeamIDs removes the "teams" edge to Team entities by IDs.

func (*TierUpdateOne) RemoveTeams

func (tuo *TierUpdateOne) RemoveTeams(t ...*Team) *TierUpdateOne

RemoveTeams removes "teams" edges to Team entities.

func (*TierUpdateOne) Save

func (tuo *TierUpdateOne) Save(ctx context.Context) (*Tier, error)

Save executes the query and returns the updated Tier entity.

func (*TierUpdateOne) SaveX

func (tuo *TierUpdateOne) SaveX(ctx context.Context) *Tier

SaveX is like Save, but panics if an error occurs.

func (*TierUpdateOne) Select

func (tuo *TierUpdateOne) Select(field string, fields ...string) *TierUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TierUpdateOne) SetConcurrentInstances

func (tuo *TierUpdateOne) SetConcurrentInstances(i int64) *TierUpdateOne

SetConcurrentInstances sets the "concurrent_instances" field.

func (*TierUpdateOne) SetDiskMB

func (tuo *TierUpdateOne) SetDiskMB(i int64) *TierUpdateOne

SetDiskMB sets the "disk_mb" field.

func (*TierUpdateOne) SetMaxLengthHours

func (tuo *TierUpdateOne) SetMaxLengthHours(i int64) *TierUpdateOne

SetMaxLengthHours sets the "max_length_hours" field.

func (*TierUpdateOne) SetName

func (tuo *TierUpdateOne) SetName(s string) *TierUpdateOne

SetName sets the "name" field.

func (*TierUpdateOne) SetNillableConcurrentInstances

func (tuo *TierUpdateOne) SetNillableConcurrentInstances(i *int64) *TierUpdateOne

SetNillableConcurrentInstances sets the "concurrent_instances" field if the given value is not nil.

func (*TierUpdateOne) SetNillableDiskMB

func (tuo *TierUpdateOne) SetNillableDiskMB(i *int64) *TierUpdateOne

SetNillableDiskMB sets the "disk_mb" field if the given value is not nil.

func (*TierUpdateOne) SetNillableMaxLengthHours

func (tuo *TierUpdateOne) SetNillableMaxLengthHours(i *int64) *TierUpdateOne

SetNillableMaxLengthHours sets the "max_length_hours" field if the given value is not nil.

func (*TierUpdateOne) SetNillableName

func (tuo *TierUpdateOne) SetNillableName(s *string) *TierUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*TierUpdateOne) Where

func (tuo *TierUpdateOne) Where(ps ...predicate.Tier) *TierUpdateOne

Where appends a list predicates to the TierUpdate builder.

type TierUpsert

type TierUpsert struct {
	*sql.UpdateSet
}

TierUpsert is the "OnConflict" setter.

func (*TierUpsert) AddConcurrentInstances

func (u *TierUpsert) AddConcurrentInstances(v int64) *TierUpsert

AddConcurrentInstances adds v to the "concurrent_instances" field.

func (*TierUpsert) AddDiskMB

func (u *TierUpsert) AddDiskMB(v int64) *TierUpsert

AddDiskMB adds v to the "disk_mb" field.

func (*TierUpsert) AddMaxLengthHours

func (u *TierUpsert) AddMaxLengthHours(v int64) *TierUpsert

AddMaxLengthHours adds v to the "max_length_hours" field.

func (*TierUpsert) SetConcurrentInstances

func (u *TierUpsert) SetConcurrentInstances(v int64) *TierUpsert

SetConcurrentInstances sets the "concurrent_instances" field.

func (*TierUpsert) SetDiskMB

func (u *TierUpsert) SetDiskMB(v int64) *TierUpsert

SetDiskMB sets the "disk_mb" field.

func (*TierUpsert) SetMaxLengthHours

func (u *TierUpsert) SetMaxLengthHours(v int64) *TierUpsert

SetMaxLengthHours sets the "max_length_hours" field.

func (*TierUpsert) SetName

func (u *TierUpsert) SetName(v string) *TierUpsert

SetName sets the "name" field.

func (*TierUpsert) UpdateConcurrentInstances

func (u *TierUpsert) UpdateConcurrentInstances() *TierUpsert

UpdateConcurrentInstances sets the "concurrent_instances" field to the value that was provided on create.

func (*TierUpsert) UpdateDiskMB

func (u *TierUpsert) UpdateDiskMB() *TierUpsert

UpdateDiskMB sets the "disk_mb" field to the value that was provided on create.

func (*TierUpsert) UpdateMaxLengthHours

func (u *TierUpsert) UpdateMaxLengthHours() *TierUpsert

UpdateMaxLengthHours sets the "max_length_hours" field to the value that was provided on create.

func (*TierUpsert) UpdateName

func (u *TierUpsert) UpdateName() *TierUpsert

UpdateName sets the "name" field to the value that was provided on create.

type TierUpsertBulk

type TierUpsertBulk struct {
	// contains filtered or unexported fields
}

TierUpsertBulk is the builder for "upsert"-ing a bulk of Tier nodes.

func (*TierUpsertBulk) AddConcurrentInstances

func (u *TierUpsertBulk) AddConcurrentInstances(v int64) *TierUpsertBulk

AddConcurrentInstances adds v to the "concurrent_instances" field.

func (*TierUpsertBulk) AddDiskMB

func (u *TierUpsertBulk) AddDiskMB(v int64) *TierUpsertBulk

AddDiskMB adds v to the "disk_mb" field.

func (*TierUpsertBulk) AddMaxLengthHours

func (u *TierUpsertBulk) AddMaxLengthHours(v int64) *TierUpsertBulk

AddMaxLengthHours adds v to the "max_length_hours" field.

func (*TierUpsertBulk) DoNothing

func (u *TierUpsertBulk) DoNothing() *TierUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TierUpsertBulk) Exec

func (u *TierUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TierUpsertBulk) ExecX

func (u *TierUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TierUpsertBulk) Ignore

func (u *TierUpsertBulk) Ignore() *TierUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Tier.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TierUpsertBulk) SetConcurrentInstances

func (u *TierUpsertBulk) SetConcurrentInstances(v int64) *TierUpsertBulk

SetConcurrentInstances sets the "concurrent_instances" field.

func (*TierUpsertBulk) SetDiskMB

func (u *TierUpsertBulk) SetDiskMB(v int64) *TierUpsertBulk

SetDiskMB sets the "disk_mb" field.

func (*TierUpsertBulk) SetMaxLengthHours

func (u *TierUpsertBulk) SetMaxLengthHours(v int64) *TierUpsertBulk

SetMaxLengthHours sets the "max_length_hours" field.

func (*TierUpsertBulk) SetName

func (u *TierUpsertBulk) SetName(v string) *TierUpsertBulk

SetName sets the "name" field.

func (*TierUpsertBulk) Update

func (u *TierUpsertBulk) Update(set func(*TierUpsert)) *TierUpsertBulk

Update allows overriding fields `UPDATE` values. See the TierCreateBulk.OnConflict documentation for more info.

func (*TierUpsertBulk) UpdateConcurrentInstances

func (u *TierUpsertBulk) UpdateConcurrentInstances() *TierUpsertBulk

UpdateConcurrentInstances sets the "concurrent_instances" field to the value that was provided on create.

func (*TierUpsertBulk) UpdateDiskMB

func (u *TierUpsertBulk) UpdateDiskMB() *TierUpsertBulk

UpdateDiskMB sets the "disk_mb" field to the value that was provided on create.

func (*TierUpsertBulk) UpdateMaxLengthHours

func (u *TierUpsertBulk) UpdateMaxLengthHours() *TierUpsertBulk

UpdateMaxLengthHours sets the "max_length_hours" field to the value that was provided on create.

func (*TierUpsertBulk) UpdateName

func (u *TierUpsertBulk) UpdateName() *TierUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*TierUpsertBulk) UpdateNewValues

func (u *TierUpsertBulk) UpdateNewValues() *TierUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Tier.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(tier.FieldID)
		}),
	).
	Exec(ctx)

type TierUpsertOne

type TierUpsertOne struct {
	// contains filtered or unexported fields
}

TierUpsertOne is the builder for "upsert"-ing

one Tier node.

func (*TierUpsertOne) AddConcurrentInstances

func (u *TierUpsertOne) AddConcurrentInstances(v int64) *TierUpsertOne

AddConcurrentInstances adds v to the "concurrent_instances" field.

func (*TierUpsertOne) AddDiskMB

func (u *TierUpsertOne) AddDiskMB(v int64) *TierUpsertOne

AddDiskMB adds v to the "disk_mb" field.

func (*TierUpsertOne) AddMaxLengthHours

func (u *TierUpsertOne) AddMaxLengthHours(v int64) *TierUpsertOne

AddMaxLengthHours adds v to the "max_length_hours" field.

func (*TierUpsertOne) DoNothing

func (u *TierUpsertOne) DoNothing() *TierUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TierUpsertOne) Exec

func (u *TierUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TierUpsertOne) ExecX

func (u *TierUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TierUpsertOne) ID

func (u *TierUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TierUpsertOne) IDX

func (u *TierUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*TierUpsertOne) Ignore

func (u *TierUpsertOne) Ignore() *TierUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Tier.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TierUpsertOne) SetConcurrentInstances

func (u *TierUpsertOne) SetConcurrentInstances(v int64) *TierUpsertOne

SetConcurrentInstances sets the "concurrent_instances" field.

func (*TierUpsertOne) SetDiskMB

func (u *TierUpsertOne) SetDiskMB(v int64) *TierUpsertOne

SetDiskMB sets the "disk_mb" field.

func (*TierUpsertOne) SetMaxLengthHours

func (u *TierUpsertOne) SetMaxLengthHours(v int64) *TierUpsertOne

SetMaxLengthHours sets the "max_length_hours" field.

func (*TierUpsertOne) SetName

func (u *TierUpsertOne) SetName(v string) *TierUpsertOne

SetName sets the "name" field.

func (*TierUpsertOne) Update

func (u *TierUpsertOne) Update(set func(*TierUpsert)) *TierUpsertOne

Update allows overriding fields `UPDATE` values. See the TierCreate.OnConflict documentation for more info.

func (*TierUpsertOne) UpdateConcurrentInstances

func (u *TierUpsertOne) UpdateConcurrentInstances() *TierUpsertOne

UpdateConcurrentInstances sets the "concurrent_instances" field to the value that was provided on create.

func (*TierUpsertOne) UpdateDiskMB

func (u *TierUpsertOne) UpdateDiskMB() *TierUpsertOne

UpdateDiskMB sets the "disk_mb" field to the value that was provided on create.

func (*TierUpsertOne) UpdateMaxLengthHours

func (u *TierUpsertOne) UpdateMaxLengthHours() *TierUpsertOne

UpdateMaxLengthHours sets the "max_length_hours" field to the value that was provided on create.

func (*TierUpsertOne) UpdateName

func (u *TierUpsertOne) UpdateName() *TierUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*TierUpsertOne) UpdateNewValues

func (u *TierUpsertOne) UpdateNewValues() *TierUpsertOne

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.Tier.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(tier.FieldID)
		}),
	).
	Exec(ctx)

type Tiers

type Tiers []*Tier

Tiers is a parsable slice of Tier.

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 {

	// AccessToken is the client for interacting with the AccessToken builders.
	AccessToken *AccessTokenClient
	// Env is the client for interacting with the Env builders.
	Env *EnvClient
	// EnvAlias is the client for interacting with the EnvAlias builders.
	EnvAlias *EnvAliasClient
	// EnvBuild is the client for interacting with the EnvBuild builders.
	EnvBuild *EnvBuildClient
	// Team is the client for interacting with the Team builders.
	Team *TeamClient
	// TeamAPIKey is the client for interacting with the TeamAPIKey builders.
	TeamAPIKey *TeamAPIKeyClient
	// Tier is the client for interacting with the Tier builders.
	Tier *TierClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UsersTeams is the client for interacting with the UsersTeams builders.
	UsersTeams *UsersTeamsClient
	// 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 uuid.UUID `json:"id,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) QueryAccessTokens

func (u *User) QueryAccessTokens() *AccessTokenQuery

QueryAccessTokens queries the "access_tokens" edge of the User entity.

func (*User) QueryTeams

func (u *User) QueryTeams() *TeamQuery

QueryTeams queries the "teams" edge of the User entity.

func (*User) QueryUsersTeams

func (u *User) QueryUsersTeams() *UsersTeamsQuery

QueryUsersTeams queries the "users_teams" edge of the User entity.

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 uuid.UUID) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *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) QueryAccessTokens

func (c *UserClient) QueryAccessTokens(u *User) *AccessTokenQuery

QueryAccessTokens queries the access_tokens edge of a User.

func (*UserClient) QueryTeams

func (c *UserClient) QueryTeams(u *User) *TeamQuery

QueryTeams queries the teams edge of a User.

func (*UserClient) QueryUsersTeams

func (c *UserClient) QueryUsersTeams(u *User) *UsersTeamsQuery

QueryUsersTeams queries the users_teams edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddAccessTokenIDs

func (uc *UserCreate) AddAccessTokenIDs(ids ...string) *UserCreate

AddAccessTokenIDs adds the "access_tokens" edge to the AccessToken entity by IDs.

func (*UserCreate) AddAccessTokens

func (uc *UserCreate) AddAccessTokens(a ...*AccessToken) *UserCreate

AddAccessTokens adds the "access_tokens" edges to the AccessToken entity.

func (*UserCreate) AddTeamIDs

func (uc *UserCreate) AddTeamIDs(ids ...uuid.UUID) *UserCreate

AddTeamIDs adds the "teams" edge to the Team entity by IDs.

func (*UserCreate) AddTeams

func (uc *UserCreate) AddTeams(t ...*Team) *UserCreate

AddTeams adds the "teams" edges to the Team entity.

func (*UserCreate) AddUsersTeamIDs

func (uc *UserCreate) AddUsersTeamIDs(ids ...int) *UserCreate

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by IDs.

func (*UserCreate) AddUsersTeams

func (uc *UserCreate) AddUsersTeams(u ...*UsersTeams) *UserCreate

AddUsersTeams adds the "users_teams" edges to the UsersTeams 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().
	SetEmail(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) {
		SetEmail(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) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate

SetID sets the "id" field.

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) {
		SetEmail(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 UserEdges

type UserEdges struct {
	// Teams holds the value of the teams edge.
	Teams []*Team `json:"teams,omitempty"`
	// AccessTokens holds the value of the access_tokens edge.
	AccessTokens []*AccessToken `json:"access_tokens,omitempty"`
	// UsersTeams holds the value of the users_teams edge.
	UsersTeams []*UsersTeams `json:"users_teams,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) AccessTokensOrErr

func (e UserEdges) AccessTokensOrErr() ([]*AccessToken, error)

AccessTokensOrErr returns the AccessTokens value or an error if the edge was not loaded in eager-loading.

func (UserEdges) TeamsOrErr

func (e UserEdges) TeamsOrErr() ([]*Team, error)

TeamsOrErr returns the Teams value or an error if the edge was not loaded in eager-loading.

func (UserEdges) UsersTeamsOrErr

func (e UserEdges) UsersTeamsOrErr() ([]*UsersTeams, error)

UsersTeamsOrErr returns the UsersTeams value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

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) AccessTokensCleared

func (m *UserMutation) AccessTokensCleared() bool

AccessTokensCleared reports if the "access_tokens" edge to the AccessToken entity was cleared.

func (*UserMutation) AccessTokensIDs

func (m *UserMutation) AccessTokensIDs() (ids []string)

AccessTokensIDs returns the "access_tokens" edge IDs in the mutation.

func (*UserMutation) AddAccessTokenIDs

func (m *UserMutation) AddAccessTokenIDs(ids ...string)

AddAccessTokenIDs adds the "access_tokens" edge to the AccessToken entity by ids.

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) AddTeamIDs

func (m *UserMutation) AddTeamIDs(ids ...uuid.UUID)

AddTeamIDs adds the "teams" edge to the Team entity by ids.

func (*UserMutation) AddUsersTeamIDs

func (m *UserMutation) AddUsersTeamIDs(ids ...int)

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) ClearAccessTokens

func (m *UserMutation) ClearAccessTokens()

ClearAccessTokens clears the "access_tokens" edge to the AccessToken entity.

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) ClearTeams

func (m *UserMutation) ClearTeams()

ClearTeams clears the "teams" edge to the Team entity.

func (*UserMutation) ClearUsersTeams

func (m *UserMutation) ClearUsersTeams()

ClearUsersTeams clears the "users_teams" edge to the UsersTeams entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, 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) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

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) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) RemoveAccessTokenIDs

func (m *UserMutation) RemoveAccessTokenIDs(ids ...string)

RemoveAccessTokenIDs removes the "access_tokens" edge to the AccessToken entity by IDs.

func (*UserMutation) RemoveTeamIDs

func (m *UserMutation) RemoveTeamIDs(ids ...uuid.UUID)

RemoveTeamIDs removes the "teams" edge to the Team entity by IDs.

func (*UserMutation) RemoveUsersTeamIDs

func (m *UserMutation) RemoveUsersTeamIDs(ids ...int)

RemoveUsersTeamIDs removes the "users_teams" edge to the UsersTeams entity by IDs.

func (*UserMutation) RemovedAccessTokensIDs

func (m *UserMutation) RemovedAccessTokensIDs() (ids []string)

RemovedAccessTokens returns the removed IDs of the "access_tokens" edge to the AccessToken entity.

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) RemovedTeamsIDs

func (m *UserMutation) RemovedTeamsIDs() (ids []uuid.UUID)

RemovedTeams returns the removed IDs of the "teams" edge to the Team entity.

func (*UserMutation) RemovedUsersTeamsIDs

func (m *UserMutation) RemovedUsersTeamsIDs() (ids []int)

RemovedUsersTeams returns the removed IDs of the "users_teams" edge to the UsersTeams entity.

func (*UserMutation) ResetAccessTokens

func (m *UserMutation) ResetAccessTokens()

ResetAccessTokens resets all changes to the "access_tokens" edge.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetTeams

func (m *UserMutation) ResetTeams()

ResetTeams resets all changes to the "teams" edge.

func (*UserMutation) ResetUsersTeams

func (m *UserMutation) ResetUsersTeams()

ResetUsersTeams resets all changes to the "users_teams" edge.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) TeamsCleared

func (m *UserMutation) TeamsCleared() bool

TeamsCleared reports if the "teams" edge to the Team entity was cleared.

func (*UserMutation) TeamsIDs

func (m *UserMutation) TeamsIDs() (ids []uuid.UUID)

TeamsIDs returns the "teams" edge IDs in the mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UsersTeamsCleared

func (m *UserMutation) UsersTeamsCleared() bool

UsersTeamsCleared reports if the "users_teams" edge to the UsersTeams entity was cleared.

func (*UserMutation) UsersTeamsIDs

func (m *UserMutation) UsersTeamsIDs() (ids []int)

UsersTeamsIDs returns the "users_teams" edge IDs 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 uuid.UUID, 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) uuid.UUID

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 {
	Email string `json:"email,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldEmail).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID

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) Modify

func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

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 uuid.UUID, 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) uuid.UUID

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) QueryAccessTokens

func (uq *UserQuery) QueryAccessTokens() *AccessTokenQuery

QueryAccessTokens chains the current query on the "access_tokens" edge.

func (*UserQuery) QueryTeams

func (uq *UserQuery) QueryTeams() *TeamQuery

QueryTeams chains the current query on the "teams" edge.

func (*UserQuery) QueryUsersTeams

func (uq *UserQuery) QueryUsersTeams() *UsersTeamsQuery

QueryUsersTeams chains the current query on the "users_teams" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
}

client.User.Query().
	Select(user.FieldEmail).
	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.

func (*UserQuery) WithAccessTokens

func (uq *UserQuery) WithAccessTokens(opts ...func(*AccessTokenQuery)) *UserQuery

WithAccessTokens tells the query-builder to eager-load the nodes that are connected to the "access_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithTeams

func (uq *UserQuery) WithTeams(opts ...func(*TeamQuery)) *UserQuery

WithTeams tells the query-builder to eager-load the nodes that are connected to the "teams" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithUsersTeams

func (uq *UserQuery) WithUsersTeams(opts ...func(*UsersTeamsQuery)) *UserQuery

WithUsersTeams tells the query-builder to eager-load the nodes that are connected to the "users_teams" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

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) Modify

func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

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) AddAccessTokenIDs

func (uu *UserUpdate) AddAccessTokenIDs(ids ...string) *UserUpdate

AddAccessTokenIDs adds the "access_tokens" edge to the AccessToken entity by IDs.

func (*UserUpdate) AddAccessTokens

func (uu *UserUpdate) AddAccessTokens(a ...*AccessToken) *UserUpdate

AddAccessTokens adds the "access_tokens" edges to the AccessToken entity.

func (*UserUpdate) AddTeamIDs

func (uu *UserUpdate) AddTeamIDs(ids ...uuid.UUID) *UserUpdate

AddTeamIDs adds the "teams" edge to the Team entity by IDs.

func (*UserUpdate) AddTeams

func (uu *UserUpdate) AddTeams(t ...*Team) *UserUpdate

AddTeams adds the "teams" edges to the Team entity.

func (*UserUpdate) AddUsersTeamIDs

func (uu *UserUpdate) AddUsersTeamIDs(ids ...int) *UserUpdate

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by IDs.

func (*UserUpdate) AddUsersTeams

func (uu *UserUpdate) AddUsersTeams(u ...*UsersTeams) *UserUpdate

AddUsersTeams adds the "users_teams" edges to the UsersTeams entity.

func (*UserUpdate) ClearAccessTokens

func (uu *UserUpdate) ClearAccessTokens() *UserUpdate

ClearAccessTokens clears all "access_tokens" edges to the AccessToken entity.

func (*UserUpdate) ClearTeams

func (uu *UserUpdate) ClearTeams() *UserUpdate

ClearTeams clears all "teams" edges to the Team entity.

func (*UserUpdate) ClearUsersTeams

func (uu *UserUpdate) ClearUsersTeams() *UserUpdate

ClearUsersTeams clears all "users_teams" edges to the UsersTeams entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Modify

func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveAccessTokenIDs

func (uu *UserUpdate) RemoveAccessTokenIDs(ids ...string) *UserUpdate

RemoveAccessTokenIDs removes the "access_tokens" edge to AccessToken entities by IDs.

func (*UserUpdate) RemoveAccessTokens

func (uu *UserUpdate) RemoveAccessTokens(a ...*AccessToken) *UserUpdate

RemoveAccessTokens removes "access_tokens" edges to AccessToken entities.

func (*UserUpdate) RemoveTeamIDs

func (uu *UserUpdate) RemoveTeamIDs(ids ...uuid.UUID) *UserUpdate

RemoveTeamIDs removes the "teams" edge to Team entities by IDs.

func (*UserUpdate) RemoveTeams

func (uu *UserUpdate) RemoveTeams(t ...*Team) *UserUpdate

RemoveTeams removes "teams" edges to Team entities.

func (*UserUpdate) RemoveUsersTeamIDs

func (uu *UserUpdate) RemoveUsersTeamIDs(ids ...int) *UserUpdate

RemoveUsersTeamIDs removes the "users_teams" edge to UsersTeams entities by IDs.

func (*UserUpdate) RemoveUsersTeams

func (uu *UserUpdate) RemoveUsersTeams(u ...*UsersTeams) *UserUpdate

RemoveUsersTeams removes "users_teams" edges to UsersTeams entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetNillableEmail

func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

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) AddAccessTokenIDs

func (uuo *UserUpdateOne) AddAccessTokenIDs(ids ...string) *UserUpdateOne

AddAccessTokenIDs adds the "access_tokens" edge to the AccessToken entity by IDs.

func (*UserUpdateOne) AddAccessTokens

func (uuo *UserUpdateOne) AddAccessTokens(a ...*AccessToken) *UserUpdateOne

AddAccessTokens adds the "access_tokens" edges to the AccessToken entity.

func (*UserUpdateOne) AddTeamIDs

func (uuo *UserUpdateOne) AddTeamIDs(ids ...uuid.UUID) *UserUpdateOne

AddTeamIDs adds the "teams" edge to the Team entity by IDs.

func (*UserUpdateOne) AddTeams

func (uuo *UserUpdateOne) AddTeams(t ...*Team) *UserUpdateOne

AddTeams adds the "teams" edges to the Team entity.

func (*UserUpdateOne) AddUsersTeamIDs

func (uuo *UserUpdateOne) AddUsersTeamIDs(ids ...int) *UserUpdateOne

AddUsersTeamIDs adds the "users_teams" edge to the UsersTeams entity by IDs.

func (*UserUpdateOne) AddUsersTeams

func (uuo *UserUpdateOne) AddUsersTeams(u ...*UsersTeams) *UserUpdateOne

AddUsersTeams adds the "users_teams" edges to the UsersTeams entity.

func (*UserUpdateOne) ClearAccessTokens

func (uuo *UserUpdateOne) ClearAccessTokens() *UserUpdateOne

ClearAccessTokens clears all "access_tokens" edges to the AccessToken entity.

func (*UserUpdateOne) ClearTeams

func (uuo *UserUpdateOne) ClearTeams() *UserUpdateOne

ClearTeams clears all "teams" edges to the Team entity.

func (*UserUpdateOne) ClearUsersTeams

func (uuo *UserUpdateOne) ClearUsersTeams() *UserUpdateOne

ClearUsersTeams clears all "users_teams" edges to the UsersTeams entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Modify

func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveAccessTokenIDs

func (uuo *UserUpdateOne) RemoveAccessTokenIDs(ids ...string) *UserUpdateOne

RemoveAccessTokenIDs removes the "access_tokens" edge to AccessToken entities by IDs.

func (*UserUpdateOne) RemoveAccessTokens

func (uuo *UserUpdateOne) RemoveAccessTokens(a ...*AccessToken) *UserUpdateOne

RemoveAccessTokens removes "access_tokens" edges to AccessToken entities.

func (*UserUpdateOne) RemoveTeamIDs

func (uuo *UserUpdateOne) RemoveTeamIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveTeamIDs removes the "teams" edge to Team entities by IDs.

func (*UserUpdateOne) RemoveTeams

func (uuo *UserUpdateOne) RemoveTeams(t ...*Team) *UserUpdateOne

RemoveTeams removes "teams" edges to Team entities.

func (*UserUpdateOne) RemoveUsersTeamIDs

func (uuo *UserUpdateOne) RemoveUsersTeamIDs(ids ...int) *UserUpdateOne

RemoveUsersTeamIDs removes the "users_teams" edge to UsersTeams entities by IDs.

func (*UserUpdateOne) RemoveUsersTeams

func (uuo *UserUpdateOne) RemoveUsersTeams(u ...*UsersTeams) *UserUpdateOne

RemoveUsersTeams removes "users_teams" edges to UsersTeams entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetNillableEmail

func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

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) SetEmail

func (u *UserUpsert) SetEmail(v string) *UserUpsert

SetEmail sets the "email" field.

func (*UserUpsert) UpdateEmail

func (u *UserUpsert) UpdateEmail() *UserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetEmail

func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk

SetEmail sets the "email" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateEmail

func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertBulk) 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)

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetEmail

func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne

SetEmail sets the "email" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateEmail

func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertOne) 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)

type Users

type Users []*User

Users is a parsable slice of User.

type UsersTeams

type UsersTeams struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// TeamID holds the value of the "team_id" field.
	TeamID uuid.UUID `json:"team_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UsersTeamsQuery when eager-loading is set.
	Edges UsersTeamsEdges `json:"edges"`
	// contains filtered or unexported fields
}

UsersTeams is the model entity for the UsersTeams schema.

func (*UsersTeams) QueryTeams

func (ut *UsersTeams) QueryTeams() *TeamQuery

QueryTeams queries the "teams" edge of the UsersTeams entity.

func (*UsersTeams) QueryUsers

func (ut *UsersTeams) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the UsersTeams entity.

func (*UsersTeams) String

func (ut *UsersTeams) String() string

String implements the fmt.Stringer.

func (*UsersTeams) Unwrap

func (ut *UsersTeams) Unwrap() *UsersTeams

Unwrap unwraps the UsersTeams 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 (*UsersTeams) Update

func (ut *UsersTeams) Update() *UsersTeamsUpdateOne

Update returns a builder for updating this UsersTeams. Note that you need to call UsersTeams.Unwrap() before calling this method if this UsersTeams was returned from a transaction, and the transaction was committed or rolled back.

func (*UsersTeams) Value

func (ut *UsersTeams) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UsersTeams. This includes values selected through modifiers, order, etc.

type UsersTeamsClient

type UsersTeamsClient struct {
	// contains filtered or unexported fields
}

UsersTeamsClient is a client for the UsersTeams schema.

func NewUsersTeamsClient

func NewUsersTeamsClient(c config) *UsersTeamsClient

NewUsersTeamsClient returns a client for the UsersTeams from the given config.

func (*UsersTeamsClient) Create

func (c *UsersTeamsClient) Create() *UsersTeamsCreate

Create returns a builder for creating a UsersTeams entity.

func (*UsersTeamsClient) CreateBulk

func (c *UsersTeamsClient) CreateBulk(builders ...*UsersTeamsCreate) *UsersTeamsCreateBulk

CreateBulk returns a builder for creating a bulk of UsersTeams entities.

func (*UsersTeamsClient) Delete

func (c *UsersTeamsClient) Delete() *UsersTeamsDelete

Delete returns a delete builder for UsersTeams.

func (*UsersTeamsClient) DeleteOne

func (c *UsersTeamsClient) DeleteOne(ut *UsersTeams) *UsersTeamsDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UsersTeamsClient) DeleteOneID

func (c *UsersTeamsClient) DeleteOneID(id int) *UsersTeamsDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UsersTeamsClient) Get

func (c *UsersTeamsClient) Get(ctx context.Context, id int) (*UsersTeams, error)

Get returns a UsersTeams entity by its id.

func (*UsersTeamsClient) GetX

func (c *UsersTeamsClient) GetX(ctx context.Context, id int) *UsersTeams

GetX is like Get, but panics if an error occurs.

func (*UsersTeamsClient) Hooks

func (c *UsersTeamsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UsersTeamsClient) Intercept

func (c *UsersTeamsClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usersteams.Intercept(f(g(h())))`.

func (*UsersTeamsClient) Interceptors

func (c *UsersTeamsClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UsersTeamsClient) MapCreateBulk

func (c *UsersTeamsClient) MapCreateBulk(slice any, setFunc func(*UsersTeamsCreate, int)) *UsersTeamsCreateBulk

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 (*UsersTeamsClient) Query

func (c *UsersTeamsClient) Query() *UsersTeamsQuery

Query returns a query builder for UsersTeams.

func (*UsersTeamsClient) QueryTeams

func (c *UsersTeamsClient) QueryTeams(ut *UsersTeams) *TeamQuery

QueryTeams queries the teams edge of a UsersTeams.

func (*UsersTeamsClient) QueryUsers

func (c *UsersTeamsClient) QueryUsers(ut *UsersTeams) *UserQuery

QueryUsers queries the users edge of a UsersTeams.

func (*UsersTeamsClient) Update

func (c *UsersTeamsClient) Update() *UsersTeamsUpdate

Update returns an update builder for UsersTeams.

func (*UsersTeamsClient) UpdateOne

func (c *UsersTeamsClient) UpdateOne(ut *UsersTeams) *UsersTeamsUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UsersTeamsClient) UpdateOneID

func (c *UsersTeamsClient) UpdateOneID(id int) *UsersTeamsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UsersTeamsClient) Use

func (c *UsersTeamsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usersteams.Hooks(f(g(h())))`.

type UsersTeamsCreate

type UsersTeamsCreate struct {
	// contains filtered or unexported fields
}

UsersTeamsCreate is the builder for creating a UsersTeams entity.

func (*UsersTeamsCreate) Exec

func (utc *UsersTeamsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UsersTeamsCreate) ExecX

func (utc *UsersTeamsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsCreate) Mutation

func (utc *UsersTeamsCreate) Mutation() *UsersTeamsMutation

Mutation returns the UsersTeamsMutation object of the builder.

func (*UsersTeamsCreate) OnConflict

func (utc *UsersTeamsCreate) OnConflict(opts ...sql.ConflictOption) *UsersTeamsUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UsersTeams.Create().
	SetUserID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UsersTeamsUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*UsersTeamsCreate) OnConflictColumns

func (utc *UsersTeamsCreate) OnConflictColumns(columns ...string) *UsersTeamsUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UsersTeams.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UsersTeamsCreate) Save

func (utc *UsersTeamsCreate) Save(ctx context.Context) (*UsersTeams, error)

Save creates the UsersTeams in the database.

func (*UsersTeamsCreate) SaveX

func (utc *UsersTeamsCreate) SaveX(ctx context.Context) *UsersTeams

SaveX calls Save and panics if Save returns an error.

func (*UsersTeamsCreate) SetTeamID

func (utc *UsersTeamsCreate) SetTeamID(u uuid.UUID) *UsersTeamsCreate

SetTeamID sets the "team_id" field.

func (*UsersTeamsCreate) SetTeams

func (utc *UsersTeamsCreate) SetTeams(t *Team) *UsersTeamsCreate

SetTeams sets the "teams" edge to the Team entity.

func (*UsersTeamsCreate) SetTeamsID

func (utc *UsersTeamsCreate) SetTeamsID(id uuid.UUID) *UsersTeamsCreate

SetTeamsID sets the "teams" edge to the Team entity by ID.

func (*UsersTeamsCreate) SetUserID

func (utc *UsersTeamsCreate) SetUserID(u uuid.UUID) *UsersTeamsCreate

SetUserID sets the "user_id" field.

func (*UsersTeamsCreate) SetUsers

func (utc *UsersTeamsCreate) SetUsers(u *User) *UsersTeamsCreate

SetUsers sets the "users" edge to the User entity.

func (*UsersTeamsCreate) SetUsersID

func (utc *UsersTeamsCreate) SetUsersID(id uuid.UUID) *UsersTeamsCreate

SetUsersID sets the "users" edge to the User entity by ID.

type UsersTeamsCreateBulk

type UsersTeamsCreateBulk struct {
	// contains filtered or unexported fields
}

UsersTeamsCreateBulk is the builder for creating many UsersTeams entities in bulk.

func (*UsersTeamsCreateBulk) Exec

func (utcb *UsersTeamsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UsersTeamsCreateBulk) ExecX

func (utcb *UsersTeamsCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsCreateBulk) OnConflict

func (utcb *UsersTeamsCreateBulk) OnConflict(opts ...sql.ConflictOption) *UsersTeamsUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UsersTeams.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.UsersTeamsUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*UsersTeamsCreateBulk) OnConflictColumns

func (utcb *UsersTeamsCreateBulk) OnConflictColumns(columns ...string) *UsersTeamsUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UsersTeams.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UsersTeamsCreateBulk) Save

func (utcb *UsersTeamsCreateBulk) Save(ctx context.Context) ([]*UsersTeams, error)

Save creates the UsersTeams entities in the database.

func (*UsersTeamsCreateBulk) SaveX

func (utcb *UsersTeamsCreateBulk) SaveX(ctx context.Context) []*UsersTeams

SaveX is like Save, but panics if an error occurs.

type UsersTeamsDelete

type UsersTeamsDelete struct {
	// contains filtered or unexported fields
}

UsersTeamsDelete is the builder for deleting a UsersTeams entity.

func (*UsersTeamsDelete) Exec

func (utd *UsersTeamsDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UsersTeamsDelete) ExecX

func (utd *UsersTeamsDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsDelete) Where

Where appends a list predicates to the UsersTeamsDelete builder.

type UsersTeamsDeleteOne

type UsersTeamsDeleteOne struct {
	// contains filtered or unexported fields
}

UsersTeamsDeleteOne is the builder for deleting a single UsersTeams entity.

func (*UsersTeamsDeleteOne) Exec

func (utdo *UsersTeamsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UsersTeamsDeleteOne) ExecX

func (utdo *UsersTeamsDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsDeleteOne) Where

Where appends a list predicates to the UsersTeamsDelete builder.

type UsersTeamsEdges

type UsersTeamsEdges struct {
	// Users holds the value of the users edge.
	Users *User `json:"users,omitempty"`
	// Teams holds the value of the teams edge.
	Teams *Team `json:"teams,omitempty"`
	// contains filtered or unexported fields
}

UsersTeamsEdges holds the relations/edges for other nodes in the graph.

func (UsersTeamsEdges) TeamsOrErr

func (e UsersTeamsEdges) TeamsOrErr() (*Team, error)

TeamsOrErr returns the Teams value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UsersTeamsEdges) UsersOrErr

func (e UsersTeamsEdges) UsersOrErr() (*User, error)

UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UsersTeamsGroupBy

type UsersTeamsGroupBy struct {
	// contains filtered or unexported fields
}

UsersTeamsGroupBy is the group-by builder for UsersTeams entities.

func (*UsersTeamsGroupBy) Aggregate

func (utgb *UsersTeamsGroupBy) Aggregate(fns ...AggregateFunc) *UsersTeamsGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UsersTeamsGroupBy) Bool

func (s *UsersTeamsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) BoolX

func (s *UsersTeamsGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UsersTeamsGroupBy) Bools

func (s *UsersTeamsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) BoolsX

func (s *UsersTeamsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UsersTeamsGroupBy) Float64

func (s *UsersTeamsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) Float64X

func (s *UsersTeamsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UsersTeamsGroupBy) Float64s

func (s *UsersTeamsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) Float64sX

func (s *UsersTeamsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UsersTeamsGroupBy) Int

func (s *UsersTeamsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) IntX

func (s *UsersTeamsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UsersTeamsGroupBy) Ints

func (s *UsersTeamsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) IntsX

func (s *UsersTeamsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UsersTeamsGroupBy) Scan

func (utgb *UsersTeamsGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UsersTeamsGroupBy) ScanX

func (s *UsersTeamsGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UsersTeamsGroupBy) String

func (s *UsersTeamsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) StringX

func (s *UsersTeamsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UsersTeamsGroupBy) Strings

func (s *UsersTeamsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UsersTeamsGroupBy) StringsX

func (s *UsersTeamsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UsersTeamsMutation

type UsersTeamsMutation struct {
	// contains filtered or unexported fields
}

UsersTeamsMutation represents an operation that mutates the UsersTeams nodes in the graph.

func (*UsersTeamsMutation) AddField

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) AddedEdges

func (m *UsersTeamsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UsersTeamsMutation) AddedField

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) AddedFields

func (m *UsersTeamsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UsersTeamsMutation) AddedIDs

func (m *UsersTeamsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UsersTeamsMutation) ClearEdge

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) ClearField

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) ClearTeams

func (m *UsersTeamsMutation) ClearTeams()

ClearTeams clears the "teams" edge to the Team entity.

func (*UsersTeamsMutation) ClearUsers

func (m *UsersTeamsMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*UsersTeamsMutation) ClearedEdges

func (m *UsersTeamsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UsersTeamsMutation) ClearedFields

func (m *UsersTeamsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UsersTeamsMutation) Client

func (m UsersTeamsMutation) 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 (*UsersTeamsMutation) EdgeCleared

func (m *UsersTeamsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UsersTeamsMutation) Field

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) FieldCleared

func (m *UsersTeamsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UsersTeamsMutation) Fields

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) ID

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) IDs

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) OldField

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) OldTeamID

func (m *UsersTeamsMutation) OldTeamID(ctx context.Context) (v uuid.UUID, err error)

OldTeamID returns the old "team_id" field's value of the UsersTeams entity. If the UsersTeams 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 (*UsersTeamsMutation) OldUserID

func (m *UsersTeamsMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the UsersTeams entity. If the UsersTeams 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 (*UsersTeamsMutation) Op

func (m *UsersTeamsMutation) Op() Op

Op returns the operation name.

func (*UsersTeamsMutation) RemovedEdges

func (m *UsersTeamsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UsersTeamsMutation) RemovedIDs

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) ResetEdge

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) ResetField

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) ResetTeamID

func (m *UsersTeamsMutation) ResetTeamID()

ResetTeamID resets all changes to the "team_id" field.

func (*UsersTeamsMutation) ResetTeams

func (m *UsersTeamsMutation) ResetTeams()

ResetTeams resets all changes to the "teams" edge.

func (*UsersTeamsMutation) ResetUserID

func (m *UsersTeamsMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UsersTeamsMutation) ResetUsers

func (m *UsersTeamsMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*UsersTeamsMutation) SetField

func (m *UsersTeamsMutation) 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 (*UsersTeamsMutation) SetOp

func (m *UsersTeamsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UsersTeamsMutation) SetTeamID

func (m *UsersTeamsMutation) SetTeamID(u uuid.UUID)

SetTeamID sets the "team_id" field.

func (*UsersTeamsMutation) SetTeamsID

func (m *UsersTeamsMutation) SetTeamsID(id uuid.UUID)

SetTeamsID sets the "teams" edge to the Team entity by id.

func (*UsersTeamsMutation) SetUserID

func (m *UsersTeamsMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*UsersTeamsMutation) SetUsersID

func (m *UsersTeamsMutation) SetUsersID(id uuid.UUID)

SetUsersID sets the "users" edge to the User entity by id.

func (*UsersTeamsMutation) TeamID

func (m *UsersTeamsMutation) TeamID() (r uuid.UUID, exists bool)

TeamID returns the value of the "team_id" field in the mutation.

func (*UsersTeamsMutation) TeamsCleared

func (m *UsersTeamsMutation) TeamsCleared() bool

TeamsCleared reports if the "teams" edge to the Team entity was cleared.

func (*UsersTeamsMutation) TeamsID

func (m *UsersTeamsMutation) TeamsID() (id uuid.UUID, exists bool)

TeamsID returns the "teams" edge ID in the mutation.

func (*UsersTeamsMutation) TeamsIDs

func (m *UsersTeamsMutation) TeamsIDs() (ids []uuid.UUID)

TeamsIDs returns the "teams" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TeamsID instead. It exists only for internal usage by the builders.

func (UsersTeamsMutation) Tx

func (m UsersTeamsMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UsersTeamsMutation) Type

func (m *UsersTeamsMutation) Type() string

Type returns the node type of this mutation (UsersTeams).

func (*UsersTeamsMutation) UserID

func (m *UsersTeamsMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UsersTeamsMutation) UsersCleared

func (m *UsersTeamsMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*UsersTeamsMutation) UsersID

func (m *UsersTeamsMutation) UsersID() (id uuid.UUID, exists bool)

UsersID returns the "users" edge ID in the mutation.

func (*UsersTeamsMutation) UsersIDs

func (m *UsersTeamsMutation) UsersIDs() (ids []uuid.UUID)

UsersIDs returns the "users" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UsersID instead. It exists only for internal usage by the builders.

func (*UsersTeamsMutation) Where

func (m *UsersTeamsMutation) Where(ps ...predicate.UsersTeams)

Where appends a list predicates to the UsersTeamsMutation builder.

func (*UsersTeamsMutation) WhereP

func (m *UsersTeamsMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UsersTeamsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UsersTeamsQuery

type UsersTeamsQuery struct {
	// contains filtered or unexported fields
}

UsersTeamsQuery is the builder for querying UsersTeams entities.

func (*UsersTeamsQuery) Aggregate

func (utq *UsersTeamsQuery) Aggregate(fns ...AggregateFunc) *UsersTeamsSelect

Aggregate returns a UsersTeamsSelect configured with the given aggregations.

func (*UsersTeamsQuery) All

func (utq *UsersTeamsQuery) All(ctx context.Context) ([]*UsersTeams, error)

All executes the query and returns a list of UsersTeamsSlice.

func (*UsersTeamsQuery) AllX

func (utq *UsersTeamsQuery) AllX(ctx context.Context) []*UsersTeams

AllX is like All, but panics if an error occurs.

func (*UsersTeamsQuery) Clone

func (utq *UsersTeamsQuery) Clone() *UsersTeamsQuery

Clone returns a duplicate of the UsersTeamsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UsersTeamsQuery) Count

func (utq *UsersTeamsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UsersTeamsQuery) CountX

func (utq *UsersTeamsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UsersTeamsQuery) Exist

func (utq *UsersTeamsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UsersTeamsQuery) ExistX

func (utq *UsersTeamsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UsersTeamsQuery) First

func (utq *UsersTeamsQuery) First(ctx context.Context) (*UsersTeams, error)

First returns the first UsersTeams entity from the query. Returns a *NotFoundError when no UsersTeams was found.

func (*UsersTeamsQuery) FirstID

func (utq *UsersTeamsQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UsersTeams ID from the query. Returns a *NotFoundError when no UsersTeams ID was found.

func (*UsersTeamsQuery) FirstIDX

func (utq *UsersTeamsQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UsersTeamsQuery) FirstX

func (utq *UsersTeamsQuery) FirstX(ctx context.Context) *UsersTeams

FirstX is like First, but panics if an error occurs.

func (*UsersTeamsQuery) GroupBy

func (utq *UsersTeamsQuery) GroupBy(field string, fields ...string) *UsersTeamsGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	UserID uuid.UUID `json:"user_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UsersTeams.Query().
	GroupBy(usersteams.FieldUserID).
	Aggregate(models.Count()).
	Scan(ctx, &v)

func (*UsersTeamsQuery) IDs

func (utq *UsersTeamsQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UsersTeams IDs.

func (*UsersTeamsQuery) IDsX

func (utq *UsersTeamsQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UsersTeamsQuery) Limit

func (utq *UsersTeamsQuery) Limit(limit int) *UsersTeamsQuery

Limit the number of records to be returned by this query.

func (*UsersTeamsQuery) Modify

func (utq *UsersTeamsQuery) Modify(modifiers ...func(s *sql.Selector)) *UsersTeamsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UsersTeamsQuery) Offset

func (utq *UsersTeamsQuery) Offset(offset int) *UsersTeamsQuery

Offset to start from.

func (*UsersTeamsQuery) Only

func (utq *UsersTeamsQuery) Only(ctx context.Context) (*UsersTeams, error)

Only returns a single UsersTeams entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UsersTeams entity is found. Returns a *NotFoundError when no UsersTeams entities are found.

func (*UsersTeamsQuery) OnlyID

func (utq *UsersTeamsQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UsersTeams ID in the query. Returns a *NotSingularError when more than one UsersTeams ID is found. Returns a *NotFoundError when no entities are found.

func (*UsersTeamsQuery) OnlyIDX

func (utq *UsersTeamsQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UsersTeamsQuery) OnlyX

func (utq *UsersTeamsQuery) OnlyX(ctx context.Context) *UsersTeams

OnlyX is like Only, but panics if an error occurs.

func (*UsersTeamsQuery) Order

Order specifies how the records should be ordered.

func (*UsersTeamsQuery) QueryTeams

func (utq *UsersTeamsQuery) QueryTeams() *TeamQuery

QueryTeams chains the current query on the "teams" edge.

func (*UsersTeamsQuery) QueryUsers

func (utq *UsersTeamsQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*UsersTeamsQuery) Select

func (utq *UsersTeamsQuery) Select(fields ...string) *UsersTeamsSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	UserID uuid.UUID `json:"user_id,omitempty"`
}

client.UsersTeams.Query().
	Select(usersteams.FieldUserID).
	Scan(ctx, &v)

func (*UsersTeamsQuery) Unique

func (utq *UsersTeamsQuery) Unique(unique bool) *UsersTeamsQuery

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 (*UsersTeamsQuery) Where

Where adds a new predicate for the UsersTeamsQuery builder.

func (*UsersTeamsQuery) WithTeams

func (utq *UsersTeamsQuery) WithTeams(opts ...func(*TeamQuery)) *UsersTeamsQuery

WithTeams tells the query-builder to eager-load the nodes that are connected to the "teams" edge. The optional arguments are used to configure the query builder of the edge.

func (*UsersTeamsQuery) WithUsers

func (utq *UsersTeamsQuery) WithUsers(opts ...func(*UserQuery)) *UsersTeamsQuery

WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.

type UsersTeamsSelect

type UsersTeamsSelect struct {
	*UsersTeamsQuery
	// contains filtered or unexported fields
}

UsersTeamsSelect is the builder for selecting fields of UsersTeams entities.

func (*UsersTeamsSelect) Aggregate

func (uts *UsersTeamsSelect) Aggregate(fns ...AggregateFunc) *UsersTeamsSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UsersTeamsSelect) Bool

func (s *UsersTeamsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) BoolX

func (s *UsersTeamsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UsersTeamsSelect) Bools

func (s *UsersTeamsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) BoolsX

func (s *UsersTeamsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UsersTeamsSelect) Float64

func (s *UsersTeamsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) Float64X

func (s *UsersTeamsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UsersTeamsSelect) Float64s

func (s *UsersTeamsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) Float64sX

func (s *UsersTeamsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UsersTeamsSelect) Int

func (s *UsersTeamsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) IntX

func (s *UsersTeamsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UsersTeamsSelect) Ints

func (s *UsersTeamsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) IntsX

func (s *UsersTeamsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UsersTeamsSelect) Modify

func (uts *UsersTeamsSelect) Modify(modifiers ...func(s *sql.Selector)) *UsersTeamsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UsersTeamsSelect) Scan

func (uts *UsersTeamsSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UsersTeamsSelect) ScanX

func (s *UsersTeamsSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UsersTeamsSelect) String

func (s *UsersTeamsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) StringX

func (s *UsersTeamsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UsersTeamsSelect) Strings

func (s *UsersTeamsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UsersTeamsSelect) StringsX

func (s *UsersTeamsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UsersTeamsSlice

type UsersTeamsSlice []*UsersTeams

UsersTeamsSlice is a parsable slice of UsersTeams.

type UsersTeamsUpdate

type UsersTeamsUpdate struct {
	// contains filtered or unexported fields
}

UsersTeamsUpdate is the builder for updating UsersTeams entities.

func (*UsersTeamsUpdate) ClearTeams

func (utu *UsersTeamsUpdate) ClearTeams() *UsersTeamsUpdate

ClearTeams clears the "teams" edge to the Team entity.

func (*UsersTeamsUpdate) ClearUsers

func (utu *UsersTeamsUpdate) ClearUsers() *UsersTeamsUpdate

ClearUsers clears the "users" edge to the User entity.

func (*UsersTeamsUpdate) Exec

func (utu *UsersTeamsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UsersTeamsUpdate) ExecX

func (utu *UsersTeamsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsUpdate) Modify

func (utu *UsersTeamsUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UsersTeamsUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UsersTeamsUpdate) Mutation

func (utu *UsersTeamsUpdate) Mutation() *UsersTeamsMutation

Mutation returns the UsersTeamsMutation object of the builder.

func (*UsersTeamsUpdate) Save

func (utu *UsersTeamsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UsersTeamsUpdate) SaveX

func (utu *UsersTeamsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UsersTeamsUpdate) SetNillableTeamID

func (utu *UsersTeamsUpdate) SetNillableTeamID(u *uuid.UUID) *UsersTeamsUpdate

SetNillableTeamID sets the "team_id" field if the given value is not nil.

func (*UsersTeamsUpdate) SetNillableUserID

func (utu *UsersTeamsUpdate) SetNillableUserID(u *uuid.UUID) *UsersTeamsUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*UsersTeamsUpdate) SetTeamID

func (utu *UsersTeamsUpdate) SetTeamID(u uuid.UUID) *UsersTeamsUpdate

SetTeamID sets the "team_id" field.

func (*UsersTeamsUpdate) SetTeams

func (utu *UsersTeamsUpdate) SetTeams(t *Team) *UsersTeamsUpdate

SetTeams sets the "teams" edge to the Team entity.

func (*UsersTeamsUpdate) SetTeamsID

func (utu *UsersTeamsUpdate) SetTeamsID(id uuid.UUID) *UsersTeamsUpdate

SetTeamsID sets the "teams" edge to the Team entity by ID.

func (*UsersTeamsUpdate) SetUserID

func (utu *UsersTeamsUpdate) SetUserID(u uuid.UUID) *UsersTeamsUpdate

SetUserID sets the "user_id" field.

func (*UsersTeamsUpdate) SetUsers

func (utu *UsersTeamsUpdate) SetUsers(u *User) *UsersTeamsUpdate

SetUsers sets the "users" edge to the User entity.

func (*UsersTeamsUpdate) SetUsersID

func (utu *UsersTeamsUpdate) SetUsersID(id uuid.UUID) *UsersTeamsUpdate

SetUsersID sets the "users" edge to the User entity by ID.

func (*UsersTeamsUpdate) Where

Where appends a list predicates to the UsersTeamsUpdate builder.

type UsersTeamsUpdateOne

type UsersTeamsUpdateOne struct {
	// contains filtered or unexported fields
}

UsersTeamsUpdateOne is the builder for updating a single UsersTeams entity.

func (*UsersTeamsUpdateOne) ClearTeams

func (utuo *UsersTeamsUpdateOne) ClearTeams() *UsersTeamsUpdateOne

ClearTeams clears the "teams" edge to the Team entity.

func (*UsersTeamsUpdateOne) ClearUsers

func (utuo *UsersTeamsUpdateOne) ClearUsers() *UsersTeamsUpdateOne

ClearUsers clears the "users" edge to the User entity.

func (*UsersTeamsUpdateOne) Exec

func (utuo *UsersTeamsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UsersTeamsUpdateOne) ExecX

func (utuo *UsersTeamsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsUpdateOne) Modify

func (utuo *UsersTeamsUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UsersTeamsUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UsersTeamsUpdateOne) Mutation

func (utuo *UsersTeamsUpdateOne) Mutation() *UsersTeamsMutation

Mutation returns the UsersTeamsMutation object of the builder.

func (*UsersTeamsUpdateOne) Save

func (utuo *UsersTeamsUpdateOne) Save(ctx context.Context) (*UsersTeams, error)

Save executes the query and returns the updated UsersTeams entity.

func (*UsersTeamsUpdateOne) SaveX

func (utuo *UsersTeamsUpdateOne) SaveX(ctx context.Context) *UsersTeams

SaveX is like Save, but panics if an error occurs.

func (*UsersTeamsUpdateOne) Select

func (utuo *UsersTeamsUpdateOne) Select(field string, fields ...string) *UsersTeamsUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UsersTeamsUpdateOne) SetNillableTeamID

func (utuo *UsersTeamsUpdateOne) SetNillableTeamID(u *uuid.UUID) *UsersTeamsUpdateOne

SetNillableTeamID sets the "team_id" field if the given value is not nil.

func (*UsersTeamsUpdateOne) SetNillableUserID

func (utuo *UsersTeamsUpdateOne) SetNillableUserID(u *uuid.UUID) *UsersTeamsUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*UsersTeamsUpdateOne) SetTeamID

func (utuo *UsersTeamsUpdateOne) SetTeamID(u uuid.UUID) *UsersTeamsUpdateOne

SetTeamID sets the "team_id" field.

func (*UsersTeamsUpdateOne) SetTeams

func (utuo *UsersTeamsUpdateOne) SetTeams(t *Team) *UsersTeamsUpdateOne

SetTeams sets the "teams" edge to the Team entity.

func (*UsersTeamsUpdateOne) SetTeamsID

func (utuo *UsersTeamsUpdateOne) SetTeamsID(id uuid.UUID) *UsersTeamsUpdateOne

SetTeamsID sets the "teams" edge to the Team entity by ID.

func (*UsersTeamsUpdateOne) SetUserID

func (utuo *UsersTeamsUpdateOne) SetUserID(u uuid.UUID) *UsersTeamsUpdateOne

SetUserID sets the "user_id" field.

func (*UsersTeamsUpdateOne) SetUsers

func (utuo *UsersTeamsUpdateOne) SetUsers(u *User) *UsersTeamsUpdateOne

SetUsers sets the "users" edge to the User entity.

func (*UsersTeamsUpdateOne) SetUsersID

func (utuo *UsersTeamsUpdateOne) SetUsersID(id uuid.UUID) *UsersTeamsUpdateOne

SetUsersID sets the "users" edge to the User entity by ID.

func (*UsersTeamsUpdateOne) Where

Where appends a list predicates to the UsersTeamsUpdate builder.

type UsersTeamsUpsert

type UsersTeamsUpsert struct {
	*sql.UpdateSet
}

UsersTeamsUpsert is the "OnConflict" setter.

func (*UsersTeamsUpsert) SetTeamID

func (u *UsersTeamsUpsert) SetTeamID(v uuid.UUID) *UsersTeamsUpsert

SetTeamID sets the "team_id" field.

func (*UsersTeamsUpsert) SetUserID

func (u *UsersTeamsUpsert) SetUserID(v uuid.UUID) *UsersTeamsUpsert

SetUserID sets the "user_id" field.

func (*UsersTeamsUpsert) UpdateTeamID

func (u *UsersTeamsUpsert) UpdateTeamID() *UsersTeamsUpsert

UpdateTeamID sets the "team_id" field to the value that was provided on create.

func (*UsersTeamsUpsert) UpdateUserID

func (u *UsersTeamsUpsert) UpdateUserID() *UsersTeamsUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type UsersTeamsUpsertBulk

type UsersTeamsUpsertBulk struct {
	// contains filtered or unexported fields
}

UsersTeamsUpsertBulk is the builder for "upsert"-ing a bulk of UsersTeams nodes.

func (*UsersTeamsUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UsersTeamsUpsertBulk) Exec

Exec executes the query.

func (*UsersTeamsUpsertBulk) ExecX

func (u *UsersTeamsUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UsersTeams.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UsersTeamsUpsertBulk) SetTeamID

SetTeamID sets the "team_id" field.

func (*UsersTeamsUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*UsersTeamsUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UsersTeamsCreateBulk.OnConflict documentation for more info.

func (*UsersTeamsUpsertBulk) UpdateNewValues

func (u *UsersTeamsUpsertBulk) UpdateNewValues() *UsersTeamsUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UsersTeams.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UsersTeamsUpsertBulk) UpdateTeamID

func (u *UsersTeamsUpsertBulk) UpdateTeamID() *UsersTeamsUpsertBulk

UpdateTeamID sets the "team_id" field to the value that was provided on create.

func (*UsersTeamsUpsertBulk) UpdateUserID

func (u *UsersTeamsUpsertBulk) UpdateUserID() *UsersTeamsUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type UsersTeamsUpsertOne

type UsersTeamsUpsertOne struct {
	// contains filtered or unexported fields
}

UsersTeamsUpsertOne is the builder for "upsert"-ing

one UsersTeams node.

func (*UsersTeamsUpsertOne) DoNothing

func (u *UsersTeamsUpsertOne) DoNothing() *UsersTeamsUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UsersTeamsUpsertOne) Exec

Exec executes the query.

func (*UsersTeamsUpsertOne) ExecX

func (u *UsersTeamsUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersTeamsUpsertOne) ID

func (u *UsersTeamsUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UsersTeamsUpsertOne) IDX

func (u *UsersTeamsUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UsersTeamsUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UsersTeams.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UsersTeamsUpsertOne) SetTeamID

SetTeamID sets the "team_id" field.

func (*UsersTeamsUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*UsersTeamsUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UsersTeamsCreate.OnConflict documentation for more info.

func (*UsersTeamsUpsertOne) UpdateNewValues

func (u *UsersTeamsUpsertOne) UpdateNewValues() *UsersTeamsUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UsersTeams.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UsersTeamsUpsertOne) UpdateTeamID

func (u *UsersTeamsUpsertOne) UpdateTeamID() *UsersTeamsUpsertOne

UpdateTeamID sets the "team_id" field to the value that was provided on create.

func (*UsersTeamsUpsertOne) UpdateUserID

func (u *UsersTeamsUpsertOne) UpdateUserID() *UsersTeamsUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

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