ent

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: AGPL-3.0 Imports: 28 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.
	TypeApprovalRule            = "ApprovalRule"
	TypeClassificationAnalytics = "ClassificationAnalytics"
	TypeClaudeMetadata          = "ClaudeMetadata"
	TypeClaudeSession           = "ClaudeSession"
	TypeDiffStats               = "DiffStats"
	TypeSession                 = "Session"
	TypeTag                     = "Tag"
	TypeWorktree                = "Worktree"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type ApprovalRule added in v1.12.0

type ApprovalRule struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// RuleID holds the value of the "rule_id" field.
	RuleID string `json:"rule_id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ToolName holds the value of the "tool_name" field.
	ToolName string `json:"tool_name,omitempty"`
	// ToolPattern holds the value of the "tool_pattern" field.
	ToolPattern string `json:"tool_pattern,omitempty"`
	// ToolCategory holds the value of the "tool_category" field.
	ToolCategory string `json:"tool_category,omitempty"`
	// CommandPattern holds the value of the "command_pattern" field.
	CommandPattern string `json:"command_pattern,omitempty"`
	// FilePattern holds the value of the "file_pattern" field.
	FilePattern string `json:"file_pattern,omitempty"`
	// Decision holds the value of the "decision" field.
	Decision int `json:"decision,omitempty"`
	// RiskLevel holds the value of the "risk_level" field.
	RiskLevel int `json:"risk_level,omitempty"`
	// Reason holds the value of the "reason" field.
	Reason string `json:"reason,omitempty"`
	// Alternative holds the value of the "alternative" field.
	Alternative string `json:"alternative,omitempty"`
	// Priority holds the value of the "priority" field.
	Priority int `json:"priority,omitempty"`
	// Enabled holds the value of the "enabled" field.
	Enabled bool `json:"enabled,omitempty"`
	// Source holds the value of the "source" field.
	Source string `json:"source,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

ApprovalRule is the model entity for the ApprovalRule schema.

func (*ApprovalRule) String added in v1.12.0

func (_m *ApprovalRule) String() string

String implements the fmt.Stringer.

func (*ApprovalRule) Unwrap added in v1.12.0

func (_m *ApprovalRule) Unwrap() *ApprovalRule

Unwrap unwraps the ApprovalRule 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 (*ApprovalRule) Update added in v1.12.0

func (_m *ApprovalRule) Update() *ApprovalRuleUpdateOne

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

func (*ApprovalRule) Value added in v1.12.0

func (_m *ApprovalRule) Value(name string) (ent.Value, error)

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

type ApprovalRuleClient added in v1.12.0

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

ApprovalRuleClient is a client for the ApprovalRule schema.

func NewApprovalRuleClient added in v1.12.0

func NewApprovalRuleClient(c config) *ApprovalRuleClient

NewApprovalRuleClient returns a client for the ApprovalRule from the given config.

func (*ApprovalRuleClient) Create added in v1.12.0

Create returns a builder for creating a ApprovalRule entity.

func (*ApprovalRuleClient) CreateBulk added in v1.12.0

func (c *ApprovalRuleClient) CreateBulk(builders ...*ApprovalRuleCreate) *ApprovalRuleCreateBulk

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

func (*ApprovalRuleClient) Delete added in v1.12.0

Delete returns a delete builder for ApprovalRule.

func (*ApprovalRuleClient) DeleteOne added in v1.12.0

DeleteOne returns a builder for deleting the given entity.

func (*ApprovalRuleClient) DeleteOneID added in v1.12.0

func (c *ApprovalRuleClient) DeleteOneID(id int) *ApprovalRuleDeleteOne

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

func (*ApprovalRuleClient) Get added in v1.12.0

Get returns a ApprovalRule entity by its id.

func (*ApprovalRuleClient) GetX added in v1.12.0

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

func (*ApprovalRuleClient) Hooks added in v1.12.0

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

Hooks returns the client hooks.

func (*ApprovalRuleClient) Intercept added in v1.12.0

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

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

func (*ApprovalRuleClient) Interceptors added in v1.12.0

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

Interceptors returns the client interceptors.

func (*ApprovalRuleClient) MapCreateBulk added in v1.12.0

func (c *ApprovalRuleClient) MapCreateBulk(slice any, setFunc func(*ApprovalRuleCreate, int)) *ApprovalRuleCreateBulk

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 (*ApprovalRuleClient) Query added in v1.12.0

Query returns a query builder for ApprovalRule.

func (*ApprovalRuleClient) Update added in v1.12.0

Update returns an update builder for ApprovalRule.

func (*ApprovalRuleClient) UpdateOne added in v1.12.0

UpdateOne returns an update builder for the given entity.

func (*ApprovalRuleClient) UpdateOneID added in v1.12.0

func (c *ApprovalRuleClient) UpdateOneID(id int) *ApprovalRuleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ApprovalRuleClient) Use added in v1.12.0

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

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

type ApprovalRuleCreate added in v1.12.0

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

ApprovalRuleCreate is the builder for creating a ApprovalRule entity.

func (*ApprovalRuleCreate) Exec added in v1.12.0

func (_c *ApprovalRuleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ApprovalRuleCreate) ExecX added in v1.12.0

func (_c *ApprovalRuleCreate) ExecX(ctx context.Context)

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

func (*ApprovalRuleCreate) Mutation added in v1.12.0

func (_c *ApprovalRuleCreate) Mutation() *ApprovalRuleMutation

Mutation returns the ApprovalRuleMutation object of the builder.

func (*ApprovalRuleCreate) OnConflict added in v1.12.0

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

client.ApprovalRule.Create().
	SetRuleID(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.ApprovalRuleUpsert) {
		SetRuleID(v+v).
	}).
	Exec(ctx)

func (*ApprovalRuleCreate) OnConflictColumns added in v1.12.0

func (_c *ApprovalRuleCreate) OnConflictColumns(columns ...string) *ApprovalRuleUpsertOne

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

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

func (*ApprovalRuleCreate) Save added in v1.12.0

Save creates the ApprovalRule in the database.

func (*ApprovalRuleCreate) SaveX added in v1.12.0

SaveX calls Save and panics if Save returns an error.

func (*ApprovalRuleCreate) SetAlternative added in v1.12.0

func (_c *ApprovalRuleCreate) SetAlternative(v string) *ApprovalRuleCreate

SetAlternative sets the "alternative" field.

func (*ApprovalRuleCreate) SetCommandPattern added in v1.12.0

func (_c *ApprovalRuleCreate) SetCommandPattern(v string) *ApprovalRuleCreate

SetCommandPattern sets the "command_pattern" field.

func (*ApprovalRuleCreate) SetCreatedAt added in v1.12.0

func (_c *ApprovalRuleCreate) SetCreatedAt(v time.Time) *ApprovalRuleCreate

SetCreatedAt sets the "created_at" field.

func (*ApprovalRuleCreate) SetDecision added in v1.12.0

func (_c *ApprovalRuleCreate) SetDecision(v int) *ApprovalRuleCreate

SetDecision sets the "decision" field.

func (*ApprovalRuleCreate) SetEnabled added in v1.12.0

func (_c *ApprovalRuleCreate) SetEnabled(v bool) *ApprovalRuleCreate

SetEnabled sets the "enabled" field.

func (*ApprovalRuleCreate) SetFilePattern added in v1.12.0

func (_c *ApprovalRuleCreate) SetFilePattern(v string) *ApprovalRuleCreate

SetFilePattern sets the "file_pattern" field.

func (*ApprovalRuleCreate) SetName added in v1.12.0

SetName sets the "name" field.

func (*ApprovalRuleCreate) SetNillableAlternative added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableAlternative(v *string) *ApprovalRuleCreate

SetNillableAlternative sets the "alternative" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableCommandPattern added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableCommandPattern(v *string) *ApprovalRuleCreate

SetNillableCommandPattern sets the "command_pattern" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableCreatedAt added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableCreatedAt(v *time.Time) *ApprovalRuleCreate

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

func (*ApprovalRuleCreate) SetNillableEnabled added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableEnabled(v *bool) *ApprovalRuleCreate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableFilePattern added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableFilePattern(v *string) *ApprovalRuleCreate

SetNillableFilePattern sets the "file_pattern" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillablePriority added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillablePriority(v *int) *ApprovalRuleCreate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableReason added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableReason(v *string) *ApprovalRuleCreate

SetNillableReason sets the "reason" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableSource added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableSource(v *string) *ApprovalRuleCreate

SetNillableSource sets the "source" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableToolCategory added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableToolCategory(v *string) *ApprovalRuleCreate

SetNillableToolCategory sets the "tool_category" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableToolName added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableToolName(v *string) *ApprovalRuleCreate

SetNillableToolName sets the "tool_name" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableToolPattern added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableToolPattern(v *string) *ApprovalRuleCreate

SetNillableToolPattern sets the "tool_pattern" field if the given value is not nil.

func (*ApprovalRuleCreate) SetNillableUpdatedAt added in v1.12.0

func (_c *ApprovalRuleCreate) SetNillableUpdatedAt(v *time.Time) *ApprovalRuleCreate

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

func (*ApprovalRuleCreate) SetPriority added in v1.12.0

func (_c *ApprovalRuleCreate) SetPriority(v int) *ApprovalRuleCreate

SetPriority sets the "priority" field.

func (*ApprovalRuleCreate) SetReason added in v1.12.0

func (_c *ApprovalRuleCreate) SetReason(v string) *ApprovalRuleCreate

SetReason sets the "reason" field.

func (*ApprovalRuleCreate) SetRiskLevel added in v1.12.0

func (_c *ApprovalRuleCreate) SetRiskLevel(v int) *ApprovalRuleCreate

SetRiskLevel sets the "risk_level" field.

func (*ApprovalRuleCreate) SetRuleID added in v1.12.0

func (_c *ApprovalRuleCreate) SetRuleID(v string) *ApprovalRuleCreate

SetRuleID sets the "rule_id" field.

func (*ApprovalRuleCreate) SetSource added in v1.12.0

func (_c *ApprovalRuleCreate) SetSource(v string) *ApprovalRuleCreate

SetSource sets the "source" field.

func (*ApprovalRuleCreate) SetToolCategory added in v1.12.0

func (_c *ApprovalRuleCreate) SetToolCategory(v string) *ApprovalRuleCreate

SetToolCategory sets the "tool_category" field.

func (*ApprovalRuleCreate) SetToolName added in v1.12.0

func (_c *ApprovalRuleCreate) SetToolName(v string) *ApprovalRuleCreate

SetToolName sets the "tool_name" field.

func (*ApprovalRuleCreate) SetToolPattern added in v1.12.0

func (_c *ApprovalRuleCreate) SetToolPattern(v string) *ApprovalRuleCreate

SetToolPattern sets the "tool_pattern" field.

func (*ApprovalRuleCreate) SetUpdatedAt added in v1.12.0

func (_c *ApprovalRuleCreate) SetUpdatedAt(v time.Time) *ApprovalRuleCreate

SetUpdatedAt sets the "updated_at" field.

type ApprovalRuleCreateBulk added in v1.12.0

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

ApprovalRuleCreateBulk is the builder for creating many ApprovalRule entities in bulk.

func (*ApprovalRuleCreateBulk) Exec added in v1.12.0

Exec executes the query.

func (*ApprovalRuleCreateBulk) ExecX added in v1.12.0

func (_c *ApprovalRuleCreateBulk) ExecX(ctx context.Context)

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

func (*ApprovalRuleCreateBulk) OnConflict added in v1.12.0

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

client.ApprovalRule.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.ApprovalRuleUpsert) {
		SetRuleID(v+v).
	}).
	Exec(ctx)

func (*ApprovalRuleCreateBulk) OnConflictColumns added in v1.12.0

func (_c *ApprovalRuleCreateBulk) OnConflictColumns(columns ...string) *ApprovalRuleUpsertBulk

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

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

func (*ApprovalRuleCreateBulk) Save added in v1.12.0

Save creates the ApprovalRule entities in the database.

func (*ApprovalRuleCreateBulk) SaveX added in v1.12.0

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

type ApprovalRuleDelete added in v1.12.0

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

ApprovalRuleDelete is the builder for deleting a ApprovalRule entity.

func (*ApprovalRuleDelete) Exec added in v1.12.0

func (_d *ApprovalRuleDelete) Exec(ctx context.Context) (int, error)

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

func (*ApprovalRuleDelete) ExecX added in v1.12.0

func (_d *ApprovalRuleDelete) ExecX(ctx context.Context) int

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

func (*ApprovalRuleDelete) Where added in v1.12.0

Where appends a list predicates to the ApprovalRuleDelete builder.

type ApprovalRuleDeleteOne added in v1.12.0

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

ApprovalRuleDeleteOne is the builder for deleting a single ApprovalRule entity.

func (*ApprovalRuleDeleteOne) Exec added in v1.12.0

Exec executes the deletion query.

func (*ApprovalRuleDeleteOne) ExecX added in v1.12.0

func (_d *ApprovalRuleDeleteOne) ExecX(ctx context.Context)

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

func (*ApprovalRuleDeleteOne) Where added in v1.12.0

Where appends a list predicates to the ApprovalRuleDelete builder.

type ApprovalRuleGroupBy added in v1.12.0

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

ApprovalRuleGroupBy is the group-by builder for ApprovalRule entities.

func (*ApprovalRuleGroupBy) Aggregate added in v1.12.0

func (_g *ApprovalRuleGroupBy) Aggregate(fns ...AggregateFunc) *ApprovalRuleGroupBy

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

func (*ApprovalRuleGroupBy) Bool added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) BoolX added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Bools added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) BoolsX added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Float64 added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Float64X added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Float64s added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Float64sX added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Int added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) IntX added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Ints added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) IntsX added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Scan added in v1.12.0

func (_g *ApprovalRuleGroupBy) Scan(ctx context.Context, v any) error

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

func (*ApprovalRuleGroupBy) ScanX added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) String added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) StringX added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) Strings added in v1.12.0

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

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

func (*ApprovalRuleGroupBy) StringsX added in v1.12.0

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

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

type ApprovalRuleMutation added in v1.12.0

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

ApprovalRuleMutation represents an operation that mutates the ApprovalRule nodes in the graph.

func (*ApprovalRuleMutation) AddDecision added in v1.12.0

func (m *ApprovalRuleMutation) AddDecision(i int)

AddDecision adds i to the "decision" field.

func (*ApprovalRuleMutation) AddField added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) AddPriority added in v1.12.0

func (m *ApprovalRuleMutation) AddPriority(i int)

AddPriority adds i to the "priority" field.

func (*ApprovalRuleMutation) AddRiskLevel added in v1.12.0

func (m *ApprovalRuleMutation) AddRiskLevel(i int)

AddRiskLevel adds i to the "risk_level" field.

func (*ApprovalRuleMutation) AddedDecision added in v1.12.0

func (m *ApprovalRuleMutation) AddedDecision() (r int, exists bool)

AddedDecision returns the value that was added to the "decision" field in this mutation.

func (*ApprovalRuleMutation) AddedEdges added in v1.12.0

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

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

func (*ApprovalRuleMutation) AddedField added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) AddedFields added in v1.12.0

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

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

func (*ApprovalRuleMutation) AddedIDs added in v1.12.0

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

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

func (*ApprovalRuleMutation) AddedPriority added in v1.12.0

func (m *ApprovalRuleMutation) AddedPriority() (r int, exists bool)

AddedPriority returns the value that was added to the "priority" field in this mutation.

func (*ApprovalRuleMutation) AddedRiskLevel added in v1.12.0

func (m *ApprovalRuleMutation) AddedRiskLevel() (r int, exists bool)

AddedRiskLevel returns the value that was added to the "risk_level" field in this mutation.

func (*ApprovalRuleMutation) Alternative added in v1.12.0

func (m *ApprovalRuleMutation) Alternative() (r string, exists bool)

Alternative returns the value of the "alternative" field in the mutation.

func (*ApprovalRuleMutation) AlternativeCleared added in v1.12.0

func (m *ApprovalRuleMutation) AlternativeCleared() bool

AlternativeCleared returns if the "alternative" field was cleared in this mutation.

func (*ApprovalRuleMutation) ClearAlternative added in v1.12.0

func (m *ApprovalRuleMutation) ClearAlternative()

ClearAlternative clears the value of the "alternative" field.

func (*ApprovalRuleMutation) ClearCommandPattern added in v1.12.0

func (m *ApprovalRuleMutation) ClearCommandPattern()

ClearCommandPattern clears the value of the "command_pattern" field.

func (*ApprovalRuleMutation) ClearEdge added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) ClearField added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) ClearFilePattern added in v1.12.0

func (m *ApprovalRuleMutation) ClearFilePattern()

ClearFilePattern clears the value of the "file_pattern" field.

func (*ApprovalRuleMutation) ClearReason added in v1.12.0

func (m *ApprovalRuleMutation) ClearReason()

ClearReason clears the value of the "reason" field.

func (*ApprovalRuleMutation) ClearToolCategory added in v1.12.0

func (m *ApprovalRuleMutation) ClearToolCategory()

ClearToolCategory clears the value of the "tool_category" field.

func (*ApprovalRuleMutation) ClearToolName added in v1.12.0

func (m *ApprovalRuleMutation) ClearToolName()

ClearToolName clears the value of the "tool_name" field.

func (*ApprovalRuleMutation) ClearToolPattern added in v1.12.0

func (m *ApprovalRuleMutation) ClearToolPattern()

ClearToolPattern clears the value of the "tool_pattern" field.

func (*ApprovalRuleMutation) ClearedEdges added in v1.12.0

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

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

func (*ApprovalRuleMutation) ClearedFields added in v1.12.0

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

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

func (ApprovalRuleMutation) Client added in v1.12.0

func (m ApprovalRuleMutation) 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 (*ApprovalRuleMutation) CommandPattern added in v1.12.0

func (m *ApprovalRuleMutation) CommandPattern() (r string, exists bool)

CommandPattern returns the value of the "command_pattern" field in the mutation.

func (*ApprovalRuleMutation) CommandPatternCleared added in v1.12.0

func (m *ApprovalRuleMutation) CommandPatternCleared() bool

CommandPatternCleared returns if the "command_pattern" field was cleared in this mutation.

func (*ApprovalRuleMutation) CreatedAt added in v1.12.0

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

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

func (*ApprovalRuleMutation) Decision added in v1.12.0

func (m *ApprovalRuleMutation) Decision() (r int, exists bool)

Decision returns the value of the "decision" field in the mutation.

func (*ApprovalRuleMutation) EdgeCleared added in v1.12.0

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

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

func (*ApprovalRuleMutation) Enabled added in v1.12.0

func (m *ApprovalRuleMutation) Enabled() (r bool, exists bool)

Enabled returns the value of the "enabled" field in the mutation.

func (*ApprovalRuleMutation) Field added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) FieldCleared added in v1.12.0

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

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

func (*ApprovalRuleMutation) Fields added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) FilePattern added in v1.12.0

func (m *ApprovalRuleMutation) FilePattern() (r string, exists bool)

FilePattern returns the value of the "file_pattern" field in the mutation.

func (*ApprovalRuleMutation) FilePatternCleared added in v1.12.0

func (m *ApprovalRuleMutation) FilePatternCleared() bool

FilePatternCleared returns if the "file_pattern" field was cleared in this mutation.

func (*ApprovalRuleMutation) ID added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) IDs added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) Name added in v1.12.0

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

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

func (*ApprovalRuleMutation) OldAlternative added in v1.12.0

func (m *ApprovalRuleMutation) OldAlternative(ctx context.Context) (v string, err error)

OldAlternative returns the old "alternative" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldCommandPattern added in v1.12.0

func (m *ApprovalRuleMutation) OldCommandPattern(ctx context.Context) (v string, err error)

OldCommandPattern returns the old "command_pattern" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldCreatedAt added in v1.12.0

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

OldCreatedAt returns the old "created_at" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldDecision added in v1.12.0

func (m *ApprovalRuleMutation) OldDecision(ctx context.Context) (v int, err error)

OldDecision returns the old "decision" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldEnabled added in v1.12.0

func (m *ApprovalRuleMutation) OldEnabled(ctx context.Context) (v bool, err error)

OldEnabled returns the old "enabled" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldField added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) OldFilePattern added in v1.12.0

func (m *ApprovalRuleMutation) OldFilePattern(ctx context.Context) (v string, err error)

OldFilePattern returns the old "file_pattern" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldName added in v1.12.0

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

OldName returns the old "name" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldPriority added in v1.12.0

func (m *ApprovalRuleMutation) OldPriority(ctx context.Context) (v int, err error)

OldPriority returns the old "priority" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldReason added in v1.12.0

func (m *ApprovalRuleMutation) OldReason(ctx context.Context) (v string, err error)

OldReason returns the old "reason" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldRiskLevel added in v1.12.0

func (m *ApprovalRuleMutation) OldRiskLevel(ctx context.Context) (v int, err error)

OldRiskLevel returns the old "risk_level" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldRuleID added in v1.12.0

func (m *ApprovalRuleMutation) OldRuleID(ctx context.Context) (v string, err error)

OldRuleID returns the old "rule_id" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldSource added in v1.12.0

func (m *ApprovalRuleMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldToolCategory added in v1.12.0

func (m *ApprovalRuleMutation) OldToolCategory(ctx context.Context) (v string, err error)

OldToolCategory returns the old "tool_category" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldToolName added in v1.12.0

func (m *ApprovalRuleMutation) OldToolName(ctx context.Context) (v string, err error)

OldToolName returns the old "tool_name" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldToolPattern added in v1.12.0

func (m *ApprovalRuleMutation) OldToolPattern(ctx context.Context) (v string, err error)

OldToolPattern returns the old "tool_pattern" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) OldUpdatedAt added in v1.12.0

func (m *ApprovalRuleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ApprovalRule entity. If the ApprovalRule 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 (*ApprovalRuleMutation) Op added in v1.12.0

func (m *ApprovalRuleMutation) Op() Op

Op returns the operation name.

func (*ApprovalRuleMutation) Priority added in v1.12.0

func (m *ApprovalRuleMutation) Priority() (r int, exists bool)

Priority returns the value of the "priority" field in the mutation.

func (*ApprovalRuleMutation) Reason added in v1.12.0

func (m *ApprovalRuleMutation) Reason() (r string, exists bool)

Reason returns the value of the "reason" field in the mutation.

func (*ApprovalRuleMutation) ReasonCleared added in v1.12.0

func (m *ApprovalRuleMutation) ReasonCleared() bool

ReasonCleared returns if the "reason" field was cleared in this mutation.

func (*ApprovalRuleMutation) RemovedEdges added in v1.12.0

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

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

func (*ApprovalRuleMutation) RemovedIDs added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) ResetAlternative added in v1.12.0

func (m *ApprovalRuleMutation) ResetAlternative()

ResetAlternative resets all changes to the "alternative" field.

func (*ApprovalRuleMutation) ResetCommandPattern added in v1.12.0

func (m *ApprovalRuleMutation) ResetCommandPattern()

ResetCommandPattern resets all changes to the "command_pattern" field.

func (*ApprovalRuleMutation) ResetCreatedAt added in v1.12.0

func (m *ApprovalRuleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ApprovalRuleMutation) ResetDecision added in v1.12.0

func (m *ApprovalRuleMutation) ResetDecision()

ResetDecision resets all changes to the "decision" field.

func (*ApprovalRuleMutation) ResetEdge added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) ResetEnabled added in v1.12.0

func (m *ApprovalRuleMutation) ResetEnabled()

ResetEnabled resets all changes to the "enabled" field.

func (*ApprovalRuleMutation) ResetField added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) ResetFilePattern added in v1.12.0

func (m *ApprovalRuleMutation) ResetFilePattern()

ResetFilePattern resets all changes to the "file_pattern" field.

func (*ApprovalRuleMutation) ResetName added in v1.12.0

func (m *ApprovalRuleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ApprovalRuleMutation) ResetPriority added in v1.12.0

func (m *ApprovalRuleMutation) ResetPriority()

ResetPriority resets all changes to the "priority" field.

func (*ApprovalRuleMutation) ResetReason added in v1.12.0

func (m *ApprovalRuleMutation) ResetReason()

ResetReason resets all changes to the "reason" field.

func (*ApprovalRuleMutation) ResetRiskLevel added in v1.12.0

func (m *ApprovalRuleMutation) ResetRiskLevel()

ResetRiskLevel resets all changes to the "risk_level" field.

func (*ApprovalRuleMutation) ResetRuleID added in v1.12.0

func (m *ApprovalRuleMutation) ResetRuleID()

ResetRuleID resets all changes to the "rule_id" field.

func (*ApprovalRuleMutation) ResetSource added in v1.12.0

func (m *ApprovalRuleMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*ApprovalRuleMutation) ResetToolCategory added in v1.12.0

func (m *ApprovalRuleMutation) ResetToolCategory()

ResetToolCategory resets all changes to the "tool_category" field.

func (*ApprovalRuleMutation) ResetToolName added in v1.12.0

func (m *ApprovalRuleMutation) ResetToolName()

ResetToolName resets all changes to the "tool_name" field.

func (*ApprovalRuleMutation) ResetToolPattern added in v1.12.0

func (m *ApprovalRuleMutation) ResetToolPattern()

ResetToolPattern resets all changes to the "tool_pattern" field.

func (*ApprovalRuleMutation) ResetUpdatedAt added in v1.12.0

func (m *ApprovalRuleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ApprovalRuleMutation) RiskLevel added in v1.12.0

func (m *ApprovalRuleMutation) RiskLevel() (r int, exists bool)

RiskLevel returns the value of the "risk_level" field in the mutation.

func (*ApprovalRuleMutation) RuleID added in v1.12.0

func (m *ApprovalRuleMutation) RuleID() (r string, exists bool)

RuleID returns the value of the "rule_id" field in the mutation.

func (*ApprovalRuleMutation) SetAlternative added in v1.12.0

func (m *ApprovalRuleMutation) SetAlternative(s string)

SetAlternative sets the "alternative" field.

func (*ApprovalRuleMutation) SetCommandPattern added in v1.12.0

func (m *ApprovalRuleMutation) SetCommandPattern(s string)

SetCommandPattern sets the "command_pattern" field.

func (*ApprovalRuleMutation) SetCreatedAt added in v1.12.0

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

SetCreatedAt sets the "created_at" field.

func (*ApprovalRuleMutation) SetDecision added in v1.12.0

func (m *ApprovalRuleMutation) SetDecision(i int)

SetDecision sets the "decision" field.

func (*ApprovalRuleMutation) SetEnabled added in v1.12.0

func (m *ApprovalRuleMutation) SetEnabled(b bool)

SetEnabled sets the "enabled" field.

func (*ApprovalRuleMutation) SetField added in v1.12.0

func (m *ApprovalRuleMutation) 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 (*ApprovalRuleMutation) SetFilePattern added in v1.12.0

func (m *ApprovalRuleMutation) SetFilePattern(s string)

SetFilePattern sets the "file_pattern" field.

func (*ApprovalRuleMutation) SetName added in v1.12.0

func (m *ApprovalRuleMutation) SetName(s string)

SetName sets the "name" field.

func (*ApprovalRuleMutation) SetOp added in v1.12.0

func (m *ApprovalRuleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ApprovalRuleMutation) SetPriority added in v1.12.0

func (m *ApprovalRuleMutation) SetPriority(i int)

SetPriority sets the "priority" field.

func (*ApprovalRuleMutation) SetReason added in v1.12.0

func (m *ApprovalRuleMutation) SetReason(s string)

SetReason sets the "reason" field.

func (*ApprovalRuleMutation) SetRiskLevel added in v1.12.0

func (m *ApprovalRuleMutation) SetRiskLevel(i int)

SetRiskLevel sets the "risk_level" field.

func (*ApprovalRuleMutation) SetRuleID added in v1.12.0

func (m *ApprovalRuleMutation) SetRuleID(s string)

SetRuleID sets the "rule_id" field.

func (*ApprovalRuleMutation) SetSource added in v1.12.0

func (m *ApprovalRuleMutation) SetSource(s string)

SetSource sets the "source" field.

func (*ApprovalRuleMutation) SetToolCategory added in v1.12.0

func (m *ApprovalRuleMutation) SetToolCategory(s string)

SetToolCategory sets the "tool_category" field.

func (*ApprovalRuleMutation) SetToolName added in v1.12.0

func (m *ApprovalRuleMutation) SetToolName(s string)

SetToolName sets the "tool_name" field.

func (*ApprovalRuleMutation) SetToolPattern added in v1.12.0

func (m *ApprovalRuleMutation) SetToolPattern(s string)

SetToolPattern sets the "tool_pattern" field.

func (*ApprovalRuleMutation) SetUpdatedAt added in v1.12.0

func (m *ApprovalRuleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ApprovalRuleMutation) Source added in v1.12.0

func (m *ApprovalRuleMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*ApprovalRuleMutation) ToolCategory added in v1.12.0

func (m *ApprovalRuleMutation) ToolCategory() (r string, exists bool)

ToolCategory returns the value of the "tool_category" field in the mutation.

func (*ApprovalRuleMutation) ToolCategoryCleared added in v1.12.0

func (m *ApprovalRuleMutation) ToolCategoryCleared() bool

ToolCategoryCleared returns if the "tool_category" field was cleared in this mutation.

func (*ApprovalRuleMutation) ToolName added in v1.12.0

func (m *ApprovalRuleMutation) ToolName() (r string, exists bool)

ToolName returns the value of the "tool_name" field in the mutation.

func (*ApprovalRuleMutation) ToolNameCleared added in v1.12.0

func (m *ApprovalRuleMutation) ToolNameCleared() bool

ToolNameCleared returns if the "tool_name" field was cleared in this mutation.

func (*ApprovalRuleMutation) ToolPattern added in v1.12.0

func (m *ApprovalRuleMutation) ToolPattern() (r string, exists bool)

ToolPattern returns the value of the "tool_pattern" field in the mutation.

func (*ApprovalRuleMutation) ToolPatternCleared added in v1.12.0

func (m *ApprovalRuleMutation) ToolPatternCleared() bool

ToolPatternCleared returns if the "tool_pattern" field was cleared in this mutation.

func (ApprovalRuleMutation) Tx added in v1.12.0

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

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

func (*ApprovalRuleMutation) Type added in v1.12.0

func (m *ApprovalRuleMutation) Type() string

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

func (*ApprovalRuleMutation) UpdatedAt added in v1.12.0

func (m *ApprovalRuleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ApprovalRuleMutation) Where added in v1.12.0

Where appends a list predicates to the ApprovalRuleMutation builder.

func (*ApprovalRuleMutation) WhereP added in v1.12.0

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

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

type ApprovalRuleQuery added in v1.12.0

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

ApprovalRuleQuery is the builder for querying ApprovalRule entities.

func (*ApprovalRuleQuery) Aggregate added in v1.12.0

func (_q *ApprovalRuleQuery) Aggregate(fns ...AggregateFunc) *ApprovalRuleSelect

Aggregate returns a ApprovalRuleSelect configured with the given aggregations.

func (*ApprovalRuleQuery) All added in v1.12.0

func (_q *ApprovalRuleQuery) All(ctx context.Context) ([]*ApprovalRule, error)

All executes the query and returns a list of ApprovalRules.

func (*ApprovalRuleQuery) AllX added in v1.12.0

func (_q *ApprovalRuleQuery) AllX(ctx context.Context) []*ApprovalRule

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

func (*ApprovalRuleQuery) Clone added in v1.12.0

func (_q *ApprovalRuleQuery) Clone() *ApprovalRuleQuery

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

func (*ApprovalRuleQuery) Count added in v1.12.0

func (_q *ApprovalRuleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ApprovalRuleQuery) CountX added in v1.12.0

func (_q *ApprovalRuleQuery) CountX(ctx context.Context) int

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

func (*ApprovalRuleQuery) Exist added in v1.12.0

func (_q *ApprovalRuleQuery) Exist(ctx context.Context) (bool, error)

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

func (*ApprovalRuleQuery) ExistX added in v1.12.0

func (_q *ApprovalRuleQuery) ExistX(ctx context.Context) bool

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

func (*ApprovalRuleQuery) First added in v1.12.0

func (_q *ApprovalRuleQuery) First(ctx context.Context) (*ApprovalRule, error)

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

func (*ApprovalRuleQuery) FirstID added in v1.12.0

func (_q *ApprovalRuleQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ApprovalRuleQuery) FirstIDX added in v1.12.0

func (_q *ApprovalRuleQuery) FirstIDX(ctx context.Context) int

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

func (*ApprovalRuleQuery) FirstX added in v1.12.0

func (_q *ApprovalRuleQuery) FirstX(ctx context.Context) *ApprovalRule

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

func (*ApprovalRuleQuery) GroupBy added in v1.12.0

func (_q *ApprovalRuleQuery) GroupBy(field string, fields ...string) *ApprovalRuleGroupBy

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

client.ApprovalRule.Query().
	GroupBy(approvalrule.FieldRuleID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ApprovalRuleQuery) IDs added in v1.12.0

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

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

func (*ApprovalRuleQuery) IDsX added in v1.12.0

func (_q *ApprovalRuleQuery) IDsX(ctx context.Context) []int

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

func (*ApprovalRuleQuery) Limit added in v1.12.0

func (_q *ApprovalRuleQuery) Limit(limit int) *ApprovalRuleQuery

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

func (*ApprovalRuleQuery) Offset added in v1.12.0

func (_q *ApprovalRuleQuery) Offset(offset int) *ApprovalRuleQuery

Offset to start from.

func (*ApprovalRuleQuery) Only added in v1.12.0

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

func (*ApprovalRuleQuery) OnlyID added in v1.12.0

func (_q *ApprovalRuleQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ApprovalRuleQuery) OnlyIDX added in v1.12.0

func (_q *ApprovalRuleQuery) OnlyIDX(ctx context.Context) int

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

func (*ApprovalRuleQuery) OnlyX added in v1.12.0

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

func (*ApprovalRuleQuery) Order added in v1.12.0

Order specifies how the records should be ordered.

func (*ApprovalRuleQuery) Select added in v1.12.0

func (_q *ApprovalRuleQuery) Select(fields ...string) *ApprovalRuleSelect

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

client.ApprovalRule.Query().
	Select(approvalrule.FieldRuleID).
	Scan(ctx, &v)

func (*ApprovalRuleQuery) Unique added in v1.12.0

func (_q *ApprovalRuleQuery) Unique(unique bool) *ApprovalRuleQuery

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 (*ApprovalRuleQuery) Where added in v1.12.0

Where adds a new predicate for the ApprovalRuleQuery builder.

type ApprovalRuleSelect added in v1.12.0

type ApprovalRuleSelect struct {
	*ApprovalRuleQuery
	// contains filtered or unexported fields
}

ApprovalRuleSelect is the builder for selecting fields of ApprovalRule entities.

func (*ApprovalRuleSelect) Aggregate added in v1.12.0

func (_s *ApprovalRuleSelect) Aggregate(fns ...AggregateFunc) *ApprovalRuleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ApprovalRuleSelect) Bool added in v1.12.0

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

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

func (*ApprovalRuleSelect) BoolX added in v1.12.0

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

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

func (*ApprovalRuleSelect) Bools added in v1.12.0

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

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

func (*ApprovalRuleSelect) BoolsX added in v1.12.0

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

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

func (*ApprovalRuleSelect) Float64 added in v1.12.0

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

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

func (*ApprovalRuleSelect) Float64X added in v1.12.0

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

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

func (*ApprovalRuleSelect) Float64s added in v1.12.0

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

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

func (*ApprovalRuleSelect) Float64sX added in v1.12.0

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

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

func (*ApprovalRuleSelect) Int added in v1.12.0

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

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

func (*ApprovalRuleSelect) IntX added in v1.12.0

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

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

func (*ApprovalRuleSelect) Ints added in v1.12.0

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

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

func (*ApprovalRuleSelect) IntsX added in v1.12.0

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

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

func (*ApprovalRuleSelect) Scan added in v1.12.0

func (_s *ApprovalRuleSelect) Scan(ctx context.Context, v any) error

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

func (*ApprovalRuleSelect) ScanX added in v1.12.0

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

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

func (*ApprovalRuleSelect) String added in v1.12.0

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

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

func (*ApprovalRuleSelect) StringX added in v1.12.0

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

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

func (*ApprovalRuleSelect) Strings added in v1.12.0

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

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

func (*ApprovalRuleSelect) StringsX added in v1.12.0

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

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

type ApprovalRuleUpdate added in v1.12.0

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

ApprovalRuleUpdate is the builder for updating ApprovalRule entities.

func (*ApprovalRuleUpdate) AddDecision added in v1.12.0

func (_u *ApprovalRuleUpdate) AddDecision(v int) *ApprovalRuleUpdate

AddDecision adds value to the "decision" field.

func (*ApprovalRuleUpdate) AddPriority added in v1.12.0

func (_u *ApprovalRuleUpdate) AddPriority(v int) *ApprovalRuleUpdate

AddPriority adds value to the "priority" field.

func (*ApprovalRuleUpdate) AddRiskLevel added in v1.12.0

func (_u *ApprovalRuleUpdate) AddRiskLevel(v int) *ApprovalRuleUpdate

AddRiskLevel adds value to the "risk_level" field.

func (*ApprovalRuleUpdate) ClearAlternative added in v1.12.0

func (_u *ApprovalRuleUpdate) ClearAlternative() *ApprovalRuleUpdate

ClearAlternative clears the value of the "alternative" field.

func (*ApprovalRuleUpdate) ClearCommandPattern added in v1.12.0

func (_u *ApprovalRuleUpdate) ClearCommandPattern() *ApprovalRuleUpdate

ClearCommandPattern clears the value of the "command_pattern" field.

func (*ApprovalRuleUpdate) ClearFilePattern added in v1.12.0

func (_u *ApprovalRuleUpdate) ClearFilePattern() *ApprovalRuleUpdate

ClearFilePattern clears the value of the "file_pattern" field.

func (*ApprovalRuleUpdate) ClearReason added in v1.12.0

func (_u *ApprovalRuleUpdate) ClearReason() *ApprovalRuleUpdate

ClearReason clears the value of the "reason" field.

func (*ApprovalRuleUpdate) ClearToolCategory added in v1.12.0

func (_u *ApprovalRuleUpdate) ClearToolCategory() *ApprovalRuleUpdate

ClearToolCategory clears the value of the "tool_category" field.

func (*ApprovalRuleUpdate) ClearToolName added in v1.12.0

func (_u *ApprovalRuleUpdate) ClearToolName() *ApprovalRuleUpdate

ClearToolName clears the value of the "tool_name" field.

func (*ApprovalRuleUpdate) ClearToolPattern added in v1.12.0

func (_u *ApprovalRuleUpdate) ClearToolPattern() *ApprovalRuleUpdate

ClearToolPattern clears the value of the "tool_pattern" field.

func (*ApprovalRuleUpdate) Exec added in v1.12.0

func (_u *ApprovalRuleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ApprovalRuleUpdate) ExecX added in v1.12.0

func (_u *ApprovalRuleUpdate) ExecX(ctx context.Context)

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

func (*ApprovalRuleUpdate) Mutation added in v1.12.0

func (_u *ApprovalRuleUpdate) Mutation() *ApprovalRuleMutation

Mutation returns the ApprovalRuleMutation object of the builder.

func (*ApprovalRuleUpdate) Save added in v1.12.0

func (_u *ApprovalRuleUpdate) Save(ctx context.Context) (int, error)

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

func (*ApprovalRuleUpdate) SaveX added in v1.12.0

func (_u *ApprovalRuleUpdate) SaveX(ctx context.Context) int

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

func (*ApprovalRuleUpdate) SetAlternative added in v1.12.0

func (_u *ApprovalRuleUpdate) SetAlternative(v string) *ApprovalRuleUpdate

SetAlternative sets the "alternative" field.

func (*ApprovalRuleUpdate) SetCommandPattern added in v1.12.0

func (_u *ApprovalRuleUpdate) SetCommandPattern(v string) *ApprovalRuleUpdate

SetCommandPattern sets the "command_pattern" field.

func (*ApprovalRuleUpdate) SetDecision added in v1.12.0

func (_u *ApprovalRuleUpdate) SetDecision(v int) *ApprovalRuleUpdate

SetDecision sets the "decision" field.

func (*ApprovalRuleUpdate) SetEnabled added in v1.12.0

func (_u *ApprovalRuleUpdate) SetEnabled(v bool) *ApprovalRuleUpdate

SetEnabled sets the "enabled" field.

func (*ApprovalRuleUpdate) SetFilePattern added in v1.12.0

func (_u *ApprovalRuleUpdate) SetFilePattern(v string) *ApprovalRuleUpdate

SetFilePattern sets the "file_pattern" field.

func (*ApprovalRuleUpdate) SetName added in v1.12.0

SetName sets the "name" field.

func (*ApprovalRuleUpdate) SetNillableAlternative added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableAlternative(v *string) *ApprovalRuleUpdate

SetNillableAlternative sets the "alternative" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableCommandPattern added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableCommandPattern(v *string) *ApprovalRuleUpdate

SetNillableCommandPattern sets the "command_pattern" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableDecision added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableDecision(v *int) *ApprovalRuleUpdate

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableEnabled added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableEnabled(v *bool) *ApprovalRuleUpdate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableFilePattern added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableFilePattern(v *string) *ApprovalRuleUpdate

SetNillableFilePattern sets the "file_pattern" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableName added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableName(v *string) *ApprovalRuleUpdate

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

func (*ApprovalRuleUpdate) SetNillablePriority added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillablePriority(v *int) *ApprovalRuleUpdate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableReason added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableReason(v *string) *ApprovalRuleUpdate

SetNillableReason sets the "reason" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableRiskLevel added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableRiskLevel(v *int) *ApprovalRuleUpdate

SetNillableRiskLevel sets the "risk_level" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableRuleID added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableRuleID(v *string) *ApprovalRuleUpdate

SetNillableRuleID sets the "rule_id" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableSource added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableSource(v *string) *ApprovalRuleUpdate

SetNillableSource sets the "source" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableToolCategory added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableToolCategory(v *string) *ApprovalRuleUpdate

SetNillableToolCategory sets the "tool_category" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableToolName added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableToolName(v *string) *ApprovalRuleUpdate

SetNillableToolName sets the "tool_name" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetNillableToolPattern added in v1.12.0

func (_u *ApprovalRuleUpdate) SetNillableToolPattern(v *string) *ApprovalRuleUpdate

SetNillableToolPattern sets the "tool_pattern" field if the given value is not nil.

func (*ApprovalRuleUpdate) SetPriority added in v1.12.0

func (_u *ApprovalRuleUpdate) SetPriority(v int) *ApprovalRuleUpdate

SetPriority sets the "priority" field.

func (*ApprovalRuleUpdate) SetReason added in v1.12.0

func (_u *ApprovalRuleUpdate) SetReason(v string) *ApprovalRuleUpdate

SetReason sets the "reason" field.

func (*ApprovalRuleUpdate) SetRiskLevel added in v1.12.0

func (_u *ApprovalRuleUpdate) SetRiskLevel(v int) *ApprovalRuleUpdate

SetRiskLevel sets the "risk_level" field.

func (*ApprovalRuleUpdate) SetRuleID added in v1.12.0

func (_u *ApprovalRuleUpdate) SetRuleID(v string) *ApprovalRuleUpdate

SetRuleID sets the "rule_id" field.

func (*ApprovalRuleUpdate) SetSource added in v1.12.0

func (_u *ApprovalRuleUpdate) SetSource(v string) *ApprovalRuleUpdate

SetSource sets the "source" field.

func (*ApprovalRuleUpdate) SetToolCategory added in v1.12.0

func (_u *ApprovalRuleUpdate) SetToolCategory(v string) *ApprovalRuleUpdate

SetToolCategory sets the "tool_category" field.

func (*ApprovalRuleUpdate) SetToolName added in v1.12.0

func (_u *ApprovalRuleUpdate) SetToolName(v string) *ApprovalRuleUpdate

SetToolName sets the "tool_name" field.

func (*ApprovalRuleUpdate) SetToolPattern added in v1.12.0

func (_u *ApprovalRuleUpdate) SetToolPattern(v string) *ApprovalRuleUpdate

SetToolPattern sets the "tool_pattern" field.

func (*ApprovalRuleUpdate) SetUpdatedAt added in v1.12.0

func (_u *ApprovalRuleUpdate) SetUpdatedAt(v time.Time) *ApprovalRuleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ApprovalRuleUpdate) Where added in v1.12.0

Where appends a list predicates to the ApprovalRuleUpdate builder.

type ApprovalRuleUpdateOne added in v1.12.0

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

ApprovalRuleUpdateOne is the builder for updating a single ApprovalRule entity.

func (*ApprovalRuleUpdateOne) AddDecision added in v1.12.0

func (_u *ApprovalRuleUpdateOne) AddDecision(v int) *ApprovalRuleUpdateOne

AddDecision adds value to the "decision" field.

func (*ApprovalRuleUpdateOne) AddPriority added in v1.12.0

func (_u *ApprovalRuleUpdateOne) AddPriority(v int) *ApprovalRuleUpdateOne

AddPriority adds value to the "priority" field.

func (*ApprovalRuleUpdateOne) AddRiskLevel added in v1.12.0

func (_u *ApprovalRuleUpdateOne) AddRiskLevel(v int) *ApprovalRuleUpdateOne

AddRiskLevel adds value to the "risk_level" field.

func (*ApprovalRuleUpdateOne) ClearAlternative added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ClearAlternative() *ApprovalRuleUpdateOne

ClearAlternative clears the value of the "alternative" field.

func (*ApprovalRuleUpdateOne) ClearCommandPattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ClearCommandPattern() *ApprovalRuleUpdateOne

ClearCommandPattern clears the value of the "command_pattern" field.

func (*ApprovalRuleUpdateOne) ClearFilePattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ClearFilePattern() *ApprovalRuleUpdateOne

ClearFilePattern clears the value of the "file_pattern" field.

func (*ApprovalRuleUpdateOne) ClearReason added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ClearReason() *ApprovalRuleUpdateOne

ClearReason clears the value of the "reason" field.

func (*ApprovalRuleUpdateOne) ClearToolCategory added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ClearToolCategory() *ApprovalRuleUpdateOne

ClearToolCategory clears the value of the "tool_category" field.

func (*ApprovalRuleUpdateOne) ClearToolName added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ClearToolName() *ApprovalRuleUpdateOne

ClearToolName clears the value of the "tool_name" field.

func (*ApprovalRuleUpdateOne) ClearToolPattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ClearToolPattern() *ApprovalRuleUpdateOne

ClearToolPattern clears the value of the "tool_pattern" field.

func (*ApprovalRuleUpdateOne) Exec added in v1.12.0

Exec executes the query on the entity.

func (*ApprovalRuleUpdateOne) ExecX added in v1.12.0

func (_u *ApprovalRuleUpdateOne) ExecX(ctx context.Context)

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

func (*ApprovalRuleUpdateOne) Mutation added in v1.12.0

Mutation returns the ApprovalRuleMutation object of the builder.

func (*ApprovalRuleUpdateOne) Save added in v1.12.0

Save executes the query and returns the updated ApprovalRule entity.

func (*ApprovalRuleUpdateOne) SaveX added in v1.12.0

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

func (*ApprovalRuleUpdateOne) Select added in v1.12.0

func (_u *ApprovalRuleUpdateOne) Select(field string, fields ...string) *ApprovalRuleUpdateOne

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

func (*ApprovalRuleUpdateOne) SetAlternative added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetAlternative(v string) *ApprovalRuleUpdateOne

SetAlternative sets the "alternative" field.

func (*ApprovalRuleUpdateOne) SetCommandPattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetCommandPattern(v string) *ApprovalRuleUpdateOne

SetCommandPattern sets the "command_pattern" field.

func (*ApprovalRuleUpdateOne) SetDecision added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetDecision(v int) *ApprovalRuleUpdateOne

SetDecision sets the "decision" field.

func (*ApprovalRuleUpdateOne) SetEnabled added in v1.12.0

SetEnabled sets the "enabled" field.

func (*ApprovalRuleUpdateOne) SetFilePattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetFilePattern(v string) *ApprovalRuleUpdateOne

SetFilePattern sets the "file_pattern" field.

func (*ApprovalRuleUpdateOne) SetName added in v1.12.0

SetName sets the "name" field.

func (*ApprovalRuleUpdateOne) SetNillableAlternative added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableAlternative(v *string) *ApprovalRuleUpdateOne

SetNillableAlternative sets the "alternative" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableCommandPattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableCommandPattern(v *string) *ApprovalRuleUpdateOne

SetNillableCommandPattern sets the "command_pattern" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableDecision added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableDecision(v *int) *ApprovalRuleUpdateOne

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableEnabled added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableEnabled(v *bool) *ApprovalRuleUpdateOne

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableFilePattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableFilePattern(v *string) *ApprovalRuleUpdateOne

SetNillableFilePattern sets the "file_pattern" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableName added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableName(v *string) *ApprovalRuleUpdateOne

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

func (*ApprovalRuleUpdateOne) SetNillablePriority added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillablePriority(v *int) *ApprovalRuleUpdateOne

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableReason added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableReason(v *string) *ApprovalRuleUpdateOne

SetNillableReason sets the "reason" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableRiskLevel added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableRiskLevel(v *int) *ApprovalRuleUpdateOne

SetNillableRiskLevel sets the "risk_level" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableRuleID added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableRuleID(v *string) *ApprovalRuleUpdateOne

SetNillableRuleID sets the "rule_id" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableSource added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableSource(v *string) *ApprovalRuleUpdateOne

SetNillableSource sets the "source" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableToolCategory added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableToolCategory(v *string) *ApprovalRuleUpdateOne

SetNillableToolCategory sets the "tool_category" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableToolName added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableToolName(v *string) *ApprovalRuleUpdateOne

SetNillableToolName sets the "tool_name" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetNillableToolPattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetNillableToolPattern(v *string) *ApprovalRuleUpdateOne

SetNillableToolPattern sets the "tool_pattern" field if the given value is not nil.

func (*ApprovalRuleUpdateOne) SetPriority added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetPriority(v int) *ApprovalRuleUpdateOne

SetPriority sets the "priority" field.

func (*ApprovalRuleUpdateOne) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ApprovalRuleUpdateOne) SetRiskLevel added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetRiskLevel(v int) *ApprovalRuleUpdateOne

SetRiskLevel sets the "risk_level" field.

func (*ApprovalRuleUpdateOne) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ApprovalRuleUpdateOne) SetSource added in v1.12.0

SetSource sets the "source" field.

func (*ApprovalRuleUpdateOne) SetToolCategory added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetToolCategory(v string) *ApprovalRuleUpdateOne

SetToolCategory sets the "tool_category" field.

func (*ApprovalRuleUpdateOne) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ApprovalRuleUpdateOne) SetToolPattern added in v1.12.0

func (_u *ApprovalRuleUpdateOne) SetToolPattern(v string) *ApprovalRuleUpdateOne

SetToolPattern sets the "tool_pattern" field.

func (*ApprovalRuleUpdateOne) SetUpdatedAt added in v1.12.0

SetUpdatedAt sets the "updated_at" field.

func (*ApprovalRuleUpdateOne) Where added in v1.12.0

Where appends a list predicates to the ApprovalRuleUpdate builder.

type ApprovalRuleUpsert added in v1.12.0

type ApprovalRuleUpsert struct {
	*sql.UpdateSet
}

ApprovalRuleUpsert is the "OnConflict" setter.

func (*ApprovalRuleUpsert) AddDecision added in v1.12.0

func (u *ApprovalRuleUpsert) AddDecision(v int) *ApprovalRuleUpsert

AddDecision adds v to the "decision" field.

func (*ApprovalRuleUpsert) AddPriority added in v1.12.0

func (u *ApprovalRuleUpsert) AddPriority(v int) *ApprovalRuleUpsert

AddPriority adds v to the "priority" field.

func (*ApprovalRuleUpsert) AddRiskLevel added in v1.12.0

func (u *ApprovalRuleUpsert) AddRiskLevel(v int) *ApprovalRuleUpsert

AddRiskLevel adds v to the "risk_level" field.

func (*ApprovalRuleUpsert) ClearAlternative added in v1.12.0

func (u *ApprovalRuleUpsert) ClearAlternative() *ApprovalRuleUpsert

ClearAlternative clears the value of the "alternative" field.

func (*ApprovalRuleUpsert) ClearCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsert) ClearCommandPattern() *ApprovalRuleUpsert

ClearCommandPattern clears the value of the "command_pattern" field.

func (*ApprovalRuleUpsert) ClearFilePattern added in v1.12.0

func (u *ApprovalRuleUpsert) ClearFilePattern() *ApprovalRuleUpsert

ClearFilePattern clears the value of the "file_pattern" field.

func (*ApprovalRuleUpsert) ClearReason added in v1.12.0

func (u *ApprovalRuleUpsert) ClearReason() *ApprovalRuleUpsert

ClearReason clears the value of the "reason" field.

func (*ApprovalRuleUpsert) ClearToolCategory added in v1.12.0

func (u *ApprovalRuleUpsert) ClearToolCategory() *ApprovalRuleUpsert

ClearToolCategory clears the value of the "tool_category" field.

func (*ApprovalRuleUpsert) ClearToolName added in v1.12.0

func (u *ApprovalRuleUpsert) ClearToolName() *ApprovalRuleUpsert

ClearToolName clears the value of the "tool_name" field.

func (*ApprovalRuleUpsert) ClearToolPattern added in v1.12.0

func (u *ApprovalRuleUpsert) ClearToolPattern() *ApprovalRuleUpsert

ClearToolPattern clears the value of the "tool_pattern" field.

func (*ApprovalRuleUpsert) SetAlternative added in v1.12.0

func (u *ApprovalRuleUpsert) SetAlternative(v string) *ApprovalRuleUpsert

SetAlternative sets the "alternative" field.

func (*ApprovalRuleUpsert) SetCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsert) SetCommandPattern(v string) *ApprovalRuleUpsert

SetCommandPattern sets the "command_pattern" field.

func (*ApprovalRuleUpsert) SetDecision added in v1.12.0

func (u *ApprovalRuleUpsert) SetDecision(v int) *ApprovalRuleUpsert

SetDecision sets the "decision" field.

func (*ApprovalRuleUpsert) SetEnabled added in v1.12.0

func (u *ApprovalRuleUpsert) SetEnabled(v bool) *ApprovalRuleUpsert

SetEnabled sets the "enabled" field.

func (*ApprovalRuleUpsert) SetFilePattern added in v1.12.0

func (u *ApprovalRuleUpsert) SetFilePattern(v string) *ApprovalRuleUpsert

SetFilePattern sets the "file_pattern" field.

func (*ApprovalRuleUpsert) SetName added in v1.12.0

SetName sets the "name" field.

func (*ApprovalRuleUpsert) SetPriority added in v1.12.0

func (u *ApprovalRuleUpsert) SetPriority(v int) *ApprovalRuleUpsert

SetPriority sets the "priority" field.

func (*ApprovalRuleUpsert) SetReason added in v1.12.0

func (u *ApprovalRuleUpsert) SetReason(v string) *ApprovalRuleUpsert

SetReason sets the "reason" field.

func (*ApprovalRuleUpsert) SetRiskLevel added in v1.12.0

func (u *ApprovalRuleUpsert) SetRiskLevel(v int) *ApprovalRuleUpsert

SetRiskLevel sets the "risk_level" field.

func (*ApprovalRuleUpsert) SetRuleID added in v1.12.0

func (u *ApprovalRuleUpsert) SetRuleID(v string) *ApprovalRuleUpsert

SetRuleID sets the "rule_id" field.

func (*ApprovalRuleUpsert) SetSource added in v1.12.0

func (u *ApprovalRuleUpsert) SetSource(v string) *ApprovalRuleUpsert

SetSource sets the "source" field.

func (*ApprovalRuleUpsert) SetToolCategory added in v1.12.0

func (u *ApprovalRuleUpsert) SetToolCategory(v string) *ApprovalRuleUpsert

SetToolCategory sets the "tool_category" field.

func (*ApprovalRuleUpsert) SetToolName added in v1.12.0

func (u *ApprovalRuleUpsert) SetToolName(v string) *ApprovalRuleUpsert

SetToolName sets the "tool_name" field.

func (*ApprovalRuleUpsert) SetToolPattern added in v1.12.0

func (u *ApprovalRuleUpsert) SetToolPattern(v string) *ApprovalRuleUpsert

SetToolPattern sets the "tool_pattern" field.

func (*ApprovalRuleUpsert) SetUpdatedAt added in v1.12.0

func (u *ApprovalRuleUpsert) SetUpdatedAt(v time.Time) *ApprovalRuleUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ApprovalRuleUpsert) UpdateAlternative added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateAlternative() *ApprovalRuleUpsert

UpdateAlternative sets the "alternative" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateCommandPattern() *ApprovalRuleUpsert

UpdateCommandPattern sets the "command_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateDecision added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateDecision() *ApprovalRuleUpsert

UpdateDecision sets the "decision" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateEnabled added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateEnabled() *ApprovalRuleUpsert

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateFilePattern added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateFilePattern() *ApprovalRuleUpsert

UpdateFilePattern sets the "file_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateName added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateName() *ApprovalRuleUpsert

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

func (*ApprovalRuleUpsert) UpdatePriority added in v1.12.0

func (u *ApprovalRuleUpsert) UpdatePriority() *ApprovalRuleUpsert

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateReason added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateReason() *ApprovalRuleUpsert

UpdateReason sets the "reason" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateRiskLevel added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateRiskLevel() *ApprovalRuleUpsert

UpdateRiskLevel sets the "risk_level" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateRuleID added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateRuleID() *ApprovalRuleUpsert

UpdateRuleID sets the "rule_id" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateSource added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateSource() *ApprovalRuleUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateToolCategory added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateToolCategory() *ApprovalRuleUpsert

UpdateToolCategory sets the "tool_category" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateToolName added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateToolName() *ApprovalRuleUpsert

UpdateToolName sets the "tool_name" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateToolPattern added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateToolPattern() *ApprovalRuleUpsert

UpdateToolPattern sets the "tool_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsert) UpdateUpdatedAt added in v1.12.0

func (u *ApprovalRuleUpsert) UpdateUpdatedAt() *ApprovalRuleUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ApprovalRuleUpsertBulk added in v1.12.0

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

ApprovalRuleUpsertBulk is the builder for "upsert"-ing a bulk of ApprovalRule nodes.

func (*ApprovalRuleUpsertBulk) AddDecision added in v1.12.0

AddDecision adds v to the "decision" field.

func (*ApprovalRuleUpsertBulk) AddPriority added in v1.12.0

AddPriority adds v to the "priority" field.

func (*ApprovalRuleUpsertBulk) AddRiskLevel added in v1.12.0

AddRiskLevel adds v to the "risk_level" field.

func (*ApprovalRuleUpsertBulk) ClearAlternative added in v1.12.0

func (u *ApprovalRuleUpsertBulk) ClearAlternative() *ApprovalRuleUpsertBulk

ClearAlternative clears the value of the "alternative" field.

func (*ApprovalRuleUpsertBulk) ClearCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsertBulk) ClearCommandPattern() *ApprovalRuleUpsertBulk

ClearCommandPattern clears the value of the "command_pattern" field.

func (*ApprovalRuleUpsertBulk) ClearFilePattern added in v1.12.0

func (u *ApprovalRuleUpsertBulk) ClearFilePattern() *ApprovalRuleUpsertBulk

ClearFilePattern clears the value of the "file_pattern" field.

func (*ApprovalRuleUpsertBulk) ClearReason added in v1.12.0

ClearReason clears the value of the "reason" field.

func (*ApprovalRuleUpsertBulk) ClearToolCategory added in v1.12.0

func (u *ApprovalRuleUpsertBulk) ClearToolCategory() *ApprovalRuleUpsertBulk

ClearToolCategory clears the value of the "tool_category" field.

func (*ApprovalRuleUpsertBulk) ClearToolName added in v1.12.0

func (u *ApprovalRuleUpsertBulk) ClearToolName() *ApprovalRuleUpsertBulk

ClearToolName clears the value of the "tool_name" field.

func (*ApprovalRuleUpsertBulk) ClearToolPattern added in v1.12.0

func (u *ApprovalRuleUpsertBulk) ClearToolPattern() *ApprovalRuleUpsertBulk

ClearToolPattern clears the value of the "tool_pattern" field.

func (*ApprovalRuleUpsertBulk) DoNothing added in v1.12.0

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

func (*ApprovalRuleUpsertBulk) Exec added in v1.12.0

Exec executes the query.

func (*ApprovalRuleUpsertBulk) ExecX added in v1.12.0

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

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

func (*ApprovalRuleUpsertBulk) Ignore added in v1.12.0

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

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

func (*ApprovalRuleUpsertBulk) SetAlternative added in v1.12.0

SetAlternative sets the "alternative" field.

func (*ApprovalRuleUpsertBulk) SetCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsertBulk) SetCommandPattern(v string) *ApprovalRuleUpsertBulk

SetCommandPattern sets the "command_pattern" field.

func (*ApprovalRuleUpsertBulk) SetDecision added in v1.12.0

SetDecision sets the "decision" field.

func (*ApprovalRuleUpsertBulk) SetEnabled added in v1.12.0

SetEnabled sets the "enabled" field.

func (*ApprovalRuleUpsertBulk) SetFilePattern added in v1.12.0

SetFilePattern sets the "file_pattern" field.

func (*ApprovalRuleUpsertBulk) SetName added in v1.12.0

SetName sets the "name" field.

func (*ApprovalRuleUpsertBulk) SetPriority added in v1.12.0

SetPriority sets the "priority" field.

func (*ApprovalRuleUpsertBulk) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ApprovalRuleUpsertBulk) SetRiskLevel added in v1.12.0

SetRiskLevel sets the "risk_level" field.

func (*ApprovalRuleUpsertBulk) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ApprovalRuleUpsertBulk) SetSource added in v1.12.0

SetSource sets the "source" field.

func (*ApprovalRuleUpsertBulk) SetToolCategory added in v1.12.0

func (u *ApprovalRuleUpsertBulk) SetToolCategory(v string) *ApprovalRuleUpsertBulk

SetToolCategory sets the "tool_category" field.

func (*ApprovalRuleUpsertBulk) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ApprovalRuleUpsertBulk) SetToolPattern added in v1.12.0

SetToolPattern sets the "tool_pattern" field.

func (*ApprovalRuleUpsertBulk) SetUpdatedAt added in v1.12.0

SetUpdatedAt sets the "updated_at" field.

func (*ApprovalRuleUpsertBulk) Update added in v1.12.0

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

func (*ApprovalRuleUpsertBulk) UpdateAlternative added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateAlternative() *ApprovalRuleUpsertBulk

UpdateAlternative sets the "alternative" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateCommandPattern() *ApprovalRuleUpsertBulk

UpdateCommandPattern sets the "command_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateDecision added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateDecision() *ApprovalRuleUpsertBulk

UpdateDecision sets the "decision" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateEnabled added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateEnabled() *ApprovalRuleUpsertBulk

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateFilePattern added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateFilePattern() *ApprovalRuleUpsertBulk

UpdateFilePattern sets the "file_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateName added in v1.12.0

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

func (*ApprovalRuleUpsertBulk) UpdateNewValues added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateNewValues() *ApprovalRuleUpsertBulk

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

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

func (*ApprovalRuleUpsertBulk) UpdatePriority added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdatePriority() *ApprovalRuleUpsertBulk

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateReason added in v1.12.0

UpdateReason sets the "reason" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateRiskLevel added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateRiskLevel() *ApprovalRuleUpsertBulk

UpdateRiskLevel sets the "risk_level" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateRuleID added in v1.12.0

UpdateRuleID sets the "rule_id" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateSource added in v1.12.0

UpdateSource sets the "source" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateToolCategory added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateToolCategory() *ApprovalRuleUpsertBulk

UpdateToolCategory sets the "tool_category" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateToolName added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateToolName() *ApprovalRuleUpsertBulk

UpdateToolName sets the "tool_name" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateToolPattern added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateToolPattern() *ApprovalRuleUpsertBulk

UpdateToolPattern sets the "tool_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsertBulk) UpdateUpdatedAt added in v1.12.0

func (u *ApprovalRuleUpsertBulk) UpdateUpdatedAt() *ApprovalRuleUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ApprovalRuleUpsertOne added in v1.12.0

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

ApprovalRuleUpsertOne is the builder for "upsert"-ing

one ApprovalRule node.

func (*ApprovalRuleUpsertOne) AddDecision added in v1.12.0

func (u *ApprovalRuleUpsertOne) AddDecision(v int) *ApprovalRuleUpsertOne

AddDecision adds v to the "decision" field.

func (*ApprovalRuleUpsertOne) AddPriority added in v1.12.0

func (u *ApprovalRuleUpsertOne) AddPriority(v int) *ApprovalRuleUpsertOne

AddPriority adds v to the "priority" field.

func (*ApprovalRuleUpsertOne) AddRiskLevel added in v1.12.0

func (u *ApprovalRuleUpsertOne) AddRiskLevel(v int) *ApprovalRuleUpsertOne

AddRiskLevel adds v to the "risk_level" field.

func (*ApprovalRuleUpsertOne) ClearAlternative added in v1.12.0

func (u *ApprovalRuleUpsertOne) ClearAlternative() *ApprovalRuleUpsertOne

ClearAlternative clears the value of the "alternative" field.

func (*ApprovalRuleUpsertOne) ClearCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) ClearCommandPattern() *ApprovalRuleUpsertOne

ClearCommandPattern clears the value of the "command_pattern" field.

func (*ApprovalRuleUpsertOne) ClearFilePattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) ClearFilePattern() *ApprovalRuleUpsertOne

ClearFilePattern clears the value of the "file_pattern" field.

func (*ApprovalRuleUpsertOne) ClearReason added in v1.12.0

func (u *ApprovalRuleUpsertOne) ClearReason() *ApprovalRuleUpsertOne

ClearReason clears the value of the "reason" field.

func (*ApprovalRuleUpsertOne) ClearToolCategory added in v1.12.0

func (u *ApprovalRuleUpsertOne) ClearToolCategory() *ApprovalRuleUpsertOne

ClearToolCategory clears the value of the "tool_category" field.

func (*ApprovalRuleUpsertOne) ClearToolName added in v1.12.0

func (u *ApprovalRuleUpsertOne) ClearToolName() *ApprovalRuleUpsertOne

ClearToolName clears the value of the "tool_name" field.

func (*ApprovalRuleUpsertOne) ClearToolPattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) ClearToolPattern() *ApprovalRuleUpsertOne

ClearToolPattern clears the value of the "tool_pattern" field.

func (*ApprovalRuleUpsertOne) DoNothing added in v1.12.0

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

func (*ApprovalRuleUpsertOne) Exec added in v1.12.0

Exec executes the query.

func (*ApprovalRuleUpsertOne) ExecX added in v1.12.0

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

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

func (*ApprovalRuleUpsertOne) ID added in v1.12.0

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

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

func (*ApprovalRuleUpsertOne) IDX added in v1.12.0

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

func (*ApprovalRuleUpsertOne) Ignore added in v1.12.0

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

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

func (*ApprovalRuleUpsertOne) SetAlternative added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetAlternative(v string) *ApprovalRuleUpsertOne

SetAlternative sets the "alternative" field.

func (*ApprovalRuleUpsertOne) SetCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetCommandPattern(v string) *ApprovalRuleUpsertOne

SetCommandPattern sets the "command_pattern" field.

func (*ApprovalRuleUpsertOne) SetDecision added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetDecision(v int) *ApprovalRuleUpsertOne

SetDecision sets the "decision" field.

func (*ApprovalRuleUpsertOne) SetEnabled added in v1.12.0

SetEnabled sets the "enabled" field.

func (*ApprovalRuleUpsertOne) SetFilePattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetFilePattern(v string) *ApprovalRuleUpsertOne

SetFilePattern sets the "file_pattern" field.

func (*ApprovalRuleUpsertOne) SetName added in v1.12.0

SetName sets the "name" field.

func (*ApprovalRuleUpsertOne) SetPriority added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetPriority(v int) *ApprovalRuleUpsertOne

SetPriority sets the "priority" field.

func (*ApprovalRuleUpsertOne) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ApprovalRuleUpsertOne) SetRiskLevel added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetRiskLevel(v int) *ApprovalRuleUpsertOne

SetRiskLevel sets the "risk_level" field.

func (*ApprovalRuleUpsertOne) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ApprovalRuleUpsertOne) SetSource added in v1.12.0

SetSource sets the "source" field.

func (*ApprovalRuleUpsertOne) SetToolCategory added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetToolCategory(v string) *ApprovalRuleUpsertOne

SetToolCategory sets the "tool_category" field.

func (*ApprovalRuleUpsertOne) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ApprovalRuleUpsertOne) SetToolPattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) SetToolPattern(v string) *ApprovalRuleUpsertOne

SetToolPattern sets the "tool_pattern" field.

func (*ApprovalRuleUpsertOne) SetUpdatedAt added in v1.12.0

SetUpdatedAt sets the "updated_at" field.

func (*ApprovalRuleUpsertOne) Update added in v1.12.0

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

func (*ApprovalRuleUpsertOne) UpdateAlternative added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateAlternative() *ApprovalRuleUpsertOne

UpdateAlternative sets the "alternative" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateCommandPattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateCommandPattern() *ApprovalRuleUpsertOne

UpdateCommandPattern sets the "command_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateDecision added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateDecision() *ApprovalRuleUpsertOne

UpdateDecision sets the "decision" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateEnabled added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateEnabled() *ApprovalRuleUpsertOne

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateFilePattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateFilePattern() *ApprovalRuleUpsertOne

UpdateFilePattern sets the "file_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateName added in v1.12.0

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

func (*ApprovalRuleUpsertOne) UpdateNewValues added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateNewValues() *ApprovalRuleUpsertOne

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

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

func (*ApprovalRuleUpsertOne) UpdatePriority added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdatePriority() *ApprovalRuleUpsertOne

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateReason added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateReason() *ApprovalRuleUpsertOne

UpdateReason sets the "reason" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateRiskLevel added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateRiskLevel() *ApprovalRuleUpsertOne

UpdateRiskLevel sets the "risk_level" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateRuleID added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateRuleID() *ApprovalRuleUpsertOne

UpdateRuleID sets the "rule_id" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateSource added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateSource() *ApprovalRuleUpsertOne

UpdateSource sets the "source" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateToolCategory added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateToolCategory() *ApprovalRuleUpsertOne

UpdateToolCategory sets the "tool_category" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateToolName added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateToolName() *ApprovalRuleUpsertOne

UpdateToolName sets the "tool_name" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateToolPattern added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateToolPattern() *ApprovalRuleUpsertOne

UpdateToolPattern sets the "tool_pattern" field to the value that was provided on create.

func (*ApprovalRuleUpsertOne) UpdateUpdatedAt added in v1.12.0

func (u *ApprovalRuleUpsertOne) UpdateUpdatedAt() *ApprovalRuleUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ApprovalRules added in v1.12.0

type ApprovalRules []*ApprovalRule

ApprovalRules is a parsable slice of ApprovalRule.

type ClassificationAnalytics added in v1.12.0

type ClassificationAnalytics struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// AnalyticsID holds the value of the "analytics_id" field.
	AnalyticsID string `json:"analytics_id,omitempty"`
	// SessionID holds the value of the "session_id" field.
	SessionID string `json:"session_id,omitempty"`
	// ToolName holds the value of the "tool_name" field.
	ToolName string `json:"tool_name,omitempty"`
	// CommandPreview holds the value of the "command_preview" field.
	CommandPreview string `json:"command_preview,omitempty"`
	// Cwd holds the value of the "cwd" field.
	Cwd string `json:"cwd,omitempty"`
	// Decision holds the value of the "decision" field.
	Decision string `json:"decision,omitempty"`
	// RiskLevel holds the value of the "risk_level" field.
	RiskLevel string `json:"risk_level,omitempty"`
	// RuleID holds the value of the "rule_id" field.
	RuleID string `json:"rule_id,omitempty"`
	// RuleName holds the value of the "rule_name" field.
	RuleName string `json:"rule_name,omitempty"`
	// Reason holds the value of the "reason" field.
	Reason string `json:"reason,omitempty"`
	// Alternative holds the value of the "alternative" field.
	Alternative string `json:"alternative,omitempty"`
	// DurationMs holds the value of the "duration_ms" field.
	DurationMs int64 `json:"duration_ms,omitempty"`
	// ApprovalID holds the value of the "approval_id" field.
	ApprovalID string `json:"approval_id,omitempty"`
	// CommandProgram holds the value of the "command_program" field.
	CommandProgram string `json:"command_program,omitempty"`
	// CommandCategory holds the value of the "command_category" field.
	CommandCategory string `json:"command_category,omitempty"`
	// CommandSubcategory holds the value of the "command_subcategory" field.
	CommandSubcategory string `json:"command_subcategory,omitempty"`
	// PythonImports holds the value of the "python_imports" field.
	PythonImports []string `json:"python_imports,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

ClassificationAnalytics is the model entity for the ClassificationAnalytics schema.

func (*ClassificationAnalytics) String added in v1.12.0

func (_m *ClassificationAnalytics) String() string

String implements the fmt.Stringer.

func (*ClassificationAnalytics) Unwrap added in v1.12.0

Unwrap unwraps the ClassificationAnalytics 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 (*ClassificationAnalytics) Update added in v1.12.0

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

func (*ClassificationAnalytics) Value added in v1.12.0

func (_m *ClassificationAnalytics) Value(name string) (ent.Value, error)

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

type ClassificationAnalyticsClient added in v1.12.0

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

ClassificationAnalyticsClient is a client for the ClassificationAnalytics schema.

func NewClassificationAnalyticsClient added in v1.12.0

func NewClassificationAnalyticsClient(c config) *ClassificationAnalyticsClient

NewClassificationAnalyticsClient returns a client for the ClassificationAnalytics from the given config.

func (*ClassificationAnalyticsClient) Create added in v1.12.0

Create returns a builder for creating a ClassificationAnalytics entity.

func (*ClassificationAnalyticsClient) CreateBulk added in v1.12.0

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

func (*ClassificationAnalyticsClient) Delete added in v1.12.0

Delete returns a delete builder for ClassificationAnalytics.

func (*ClassificationAnalyticsClient) DeleteOne added in v1.12.0

DeleteOne returns a builder for deleting the given entity.

func (*ClassificationAnalyticsClient) DeleteOneID added in v1.12.0

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

func (*ClassificationAnalyticsClient) Get added in v1.12.0

Get returns a ClassificationAnalytics entity by its id.

func (*ClassificationAnalyticsClient) GetX added in v1.12.0

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

func (*ClassificationAnalyticsClient) Hooks added in v1.12.0

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

Hooks returns the client hooks.

func (*ClassificationAnalyticsClient) Intercept added in v1.12.0

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

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

func (*ClassificationAnalyticsClient) Interceptors added in v1.12.0

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

Interceptors returns the client interceptors.

func (*ClassificationAnalyticsClient) MapCreateBulk added in v1.12.0

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 (*ClassificationAnalyticsClient) Query added in v1.12.0

Query returns a query builder for ClassificationAnalytics.

func (*ClassificationAnalyticsClient) Update added in v1.12.0

Update returns an update builder for ClassificationAnalytics.

func (*ClassificationAnalyticsClient) UpdateOne added in v1.12.0

UpdateOne returns an update builder for the given entity.

func (*ClassificationAnalyticsClient) UpdateOneID added in v1.12.0

UpdateOneID returns an update builder for the given id.

func (*ClassificationAnalyticsClient) Use added in v1.12.0

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

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

type ClassificationAnalyticsCreate added in v1.12.0

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

ClassificationAnalyticsCreate is the builder for creating a ClassificationAnalytics entity.

func (*ClassificationAnalyticsCreate) Exec added in v1.12.0

Exec executes the query.

func (*ClassificationAnalyticsCreate) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsCreate) Mutation added in v1.12.0

Mutation returns the ClassificationAnalyticsMutation object of the builder.

func (*ClassificationAnalyticsCreate) OnConflict added in v1.12.0

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

client.ClassificationAnalytics.Create().
	SetAnalyticsID(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.ClassificationAnalyticsUpsert) {
		SetAnalyticsID(v+v).
	}).
	Exec(ctx)

func (*ClassificationAnalyticsCreate) OnConflictColumns added in v1.12.0

func (_c *ClassificationAnalyticsCreate) OnConflictColumns(columns ...string) *ClassificationAnalyticsUpsertOne

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

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

func (*ClassificationAnalyticsCreate) Save added in v1.12.0

Save creates the ClassificationAnalytics in the database.

func (*ClassificationAnalyticsCreate) SaveX added in v1.12.0

SaveX calls Save and panics if Save returns an error.

func (*ClassificationAnalyticsCreate) SetAlternative added in v1.12.0

SetAlternative sets the "alternative" field.

func (*ClassificationAnalyticsCreate) SetAnalyticsID added in v1.12.0

SetAnalyticsID sets the "analytics_id" field.

func (*ClassificationAnalyticsCreate) SetApprovalID added in v1.12.0

SetApprovalID sets the "approval_id" field.

func (*ClassificationAnalyticsCreate) SetCommandCategory added in v1.12.0

SetCommandCategory sets the "command_category" field.

func (*ClassificationAnalyticsCreate) SetCommandPreview added in v1.12.0

SetCommandPreview sets the "command_preview" field.

func (*ClassificationAnalyticsCreate) SetCommandProgram added in v1.12.0

SetCommandProgram sets the "command_program" field.

func (*ClassificationAnalyticsCreate) SetCommandSubcategory added in v1.12.0

SetCommandSubcategory sets the "command_subcategory" field.

func (*ClassificationAnalyticsCreate) SetCreatedAt added in v1.12.0

SetCreatedAt sets the "created_at" field.

func (*ClassificationAnalyticsCreate) SetCwd added in v1.12.0

SetCwd sets the "cwd" field.

func (*ClassificationAnalyticsCreate) SetDecision added in v1.12.0

SetDecision sets the "decision" field.

func (*ClassificationAnalyticsCreate) SetDurationMs added in v1.12.0

SetDurationMs sets the "duration_ms" field.

func (*ClassificationAnalyticsCreate) SetNillableAlternative added in v1.12.0

func (_c *ClassificationAnalyticsCreate) SetNillableAlternative(v *string) *ClassificationAnalyticsCreate

SetNillableAlternative sets the "alternative" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableApprovalID added in v1.12.0

SetNillableApprovalID sets the "approval_id" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableCommandCategory added in v1.12.0

func (_c *ClassificationAnalyticsCreate) SetNillableCommandCategory(v *string) *ClassificationAnalyticsCreate

SetNillableCommandCategory sets the "command_category" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableCommandPreview added in v1.12.0

func (_c *ClassificationAnalyticsCreate) SetNillableCommandPreview(v *string) *ClassificationAnalyticsCreate

SetNillableCommandPreview sets the "command_preview" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableCommandProgram added in v1.12.0

func (_c *ClassificationAnalyticsCreate) SetNillableCommandProgram(v *string) *ClassificationAnalyticsCreate

SetNillableCommandProgram sets the "command_program" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableCommandSubcategory added in v1.12.0

func (_c *ClassificationAnalyticsCreate) SetNillableCommandSubcategory(v *string) *ClassificationAnalyticsCreate

SetNillableCommandSubcategory sets the "command_subcategory" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableCreatedAt added in v1.12.0

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

func (*ClassificationAnalyticsCreate) SetNillableCwd added in v1.12.0

SetNillableCwd sets the "cwd" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableDurationMs added in v1.12.0

func (_c *ClassificationAnalyticsCreate) SetNillableDurationMs(v *int64) *ClassificationAnalyticsCreate

SetNillableDurationMs sets the "duration_ms" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableReason added in v1.12.0

SetNillableReason sets the "reason" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableRuleID added in v1.12.0

SetNillableRuleID sets the "rule_id" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableRuleName added in v1.12.0

SetNillableRuleName sets the "rule_name" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetNillableSessionID added in v1.12.0

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*ClassificationAnalyticsCreate) SetPythonImports added in v1.12.0

SetPythonImports sets the "python_imports" field.

func (*ClassificationAnalyticsCreate) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ClassificationAnalyticsCreate) SetRiskLevel added in v1.12.0

SetRiskLevel sets the "risk_level" field.

func (*ClassificationAnalyticsCreate) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ClassificationAnalyticsCreate) SetRuleName added in v1.12.0

SetRuleName sets the "rule_name" field.

func (*ClassificationAnalyticsCreate) SetSessionID added in v1.12.0

SetSessionID sets the "session_id" field.

func (*ClassificationAnalyticsCreate) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

type ClassificationAnalyticsCreateBulk added in v1.12.0

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

ClassificationAnalyticsCreateBulk is the builder for creating many ClassificationAnalytics entities in bulk.

func (*ClassificationAnalyticsCreateBulk) Exec added in v1.12.0

Exec executes the query.

func (*ClassificationAnalyticsCreateBulk) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsCreateBulk) OnConflict added in v1.12.0

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

client.ClassificationAnalytics.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.ClassificationAnalyticsUpsert) {
		SetAnalyticsID(v+v).
	}).
	Exec(ctx)

func (*ClassificationAnalyticsCreateBulk) OnConflictColumns added in v1.12.0

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

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

func (*ClassificationAnalyticsCreateBulk) Save added in v1.12.0

Save creates the ClassificationAnalytics entities in the database.

func (*ClassificationAnalyticsCreateBulk) SaveX added in v1.12.0

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

type ClassificationAnalyticsDelete added in v1.12.0

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

ClassificationAnalyticsDelete is the builder for deleting a ClassificationAnalytics entity.

func (*ClassificationAnalyticsDelete) Exec added in v1.12.0

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

func (*ClassificationAnalyticsDelete) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsDelete) Where added in v1.12.0

Where appends a list predicates to the ClassificationAnalyticsDelete builder.

type ClassificationAnalyticsDeleteOne added in v1.12.0

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

ClassificationAnalyticsDeleteOne is the builder for deleting a single ClassificationAnalytics entity.

func (*ClassificationAnalyticsDeleteOne) Exec added in v1.12.0

Exec executes the deletion query.

func (*ClassificationAnalyticsDeleteOne) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsDeleteOne) Where added in v1.12.0

Where appends a list predicates to the ClassificationAnalyticsDelete builder.

type ClassificationAnalyticsGroupBy added in v1.12.0

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

ClassificationAnalyticsGroupBy is the group-by builder for ClassificationAnalytics entities.

func (*ClassificationAnalyticsGroupBy) Aggregate added in v1.12.0

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

func (*ClassificationAnalyticsGroupBy) Bool added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) BoolX added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Bools added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) BoolsX added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Float64 added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Float64X added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Float64s added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Float64sX added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Int added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) IntX added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Ints added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) IntsX added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Scan added in v1.12.0

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

func (*ClassificationAnalyticsGroupBy) ScanX added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) String added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) StringX added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) Strings added in v1.12.0

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

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

func (*ClassificationAnalyticsGroupBy) StringsX added in v1.12.0

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

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

type ClassificationAnalyticsMutation added in v1.12.0

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

ClassificationAnalyticsMutation represents an operation that mutates the ClassificationAnalytics nodes in the graph.

func (*ClassificationAnalyticsMutation) AddDurationMs added in v1.12.0

func (m *ClassificationAnalyticsMutation) AddDurationMs(i int64)

AddDurationMs adds i to the "duration_ms" field.

func (*ClassificationAnalyticsMutation) AddField added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) AddedDurationMs added in v1.12.0

func (m *ClassificationAnalyticsMutation) AddedDurationMs() (r int64, exists bool)

AddedDurationMs returns the value that was added to the "duration_ms" field in this mutation.

func (*ClassificationAnalyticsMutation) AddedEdges added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) AddedField added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) AddedFields added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) AddedIDs added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) Alternative added in v1.12.0

func (m *ClassificationAnalyticsMutation) Alternative() (r string, exists bool)

Alternative returns the value of the "alternative" field in the mutation.

func (*ClassificationAnalyticsMutation) AlternativeCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) AlternativeCleared() bool

AlternativeCleared returns if the "alternative" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) AnalyticsID added in v1.12.0

func (m *ClassificationAnalyticsMutation) AnalyticsID() (r string, exists bool)

AnalyticsID returns the value of the "analytics_id" field in the mutation.

func (*ClassificationAnalyticsMutation) AppendPythonImports added in v1.12.0

func (m *ClassificationAnalyticsMutation) AppendPythonImports(s []string)

AppendPythonImports adds s to the "python_imports" field.

func (*ClassificationAnalyticsMutation) AppendedPythonImports added in v1.12.0

func (m *ClassificationAnalyticsMutation) AppendedPythonImports() ([]string, bool)

AppendedPythonImports returns the list of values that were appended to the "python_imports" field in this mutation.

func (*ClassificationAnalyticsMutation) ApprovalID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ApprovalID() (r string, exists bool)

ApprovalID returns the value of the "approval_id" field in the mutation.

func (*ClassificationAnalyticsMutation) ApprovalIDCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) ApprovalIDCleared() bool

ApprovalIDCleared returns if the "approval_id" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) ClearAlternative added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearAlternative()

ClearAlternative clears the value of the "alternative" field.

func (*ClassificationAnalyticsMutation) ClearApprovalID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearApprovalID()

ClearApprovalID clears the value of the "approval_id" field.

func (*ClassificationAnalyticsMutation) ClearCommandCategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearCommandCategory()

ClearCommandCategory clears the value of the "command_category" field.

func (*ClassificationAnalyticsMutation) ClearCommandPreview added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearCommandPreview()

ClearCommandPreview clears the value of the "command_preview" field.

func (*ClassificationAnalyticsMutation) ClearCommandProgram added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearCommandProgram()

ClearCommandProgram clears the value of the "command_program" field.

func (*ClassificationAnalyticsMutation) ClearCommandSubcategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearCommandSubcategory()

ClearCommandSubcategory clears the value of the "command_subcategory" field.

func (*ClassificationAnalyticsMutation) ClearCwd added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearCwd()

ClearCwd clears the value of the "cwd" field.

func (*ClassificationAnalyticsMutation) ClearEdge added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) ClearField added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) ClearPythonImports added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearPythonImports()

ClearPythonImports clears the value of the "python_imports" field.

func (*ClassificationAnalyticsMutation) ClearReason added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearReason()

ClearReason clears the value of the "reason" field.

func (*ClassificationAnalyticsMutation) ClearRuleID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearRuleID()

ClearRuleID clears the value of the "rule_id" field.

func (*ClassificationAnalyticsMutation) ClearRuleName added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearRuleName()

ClearRuleName clears the value of the "rule_name" field.

func (*ClassificationAnalyticsMutation) ClearSessionID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ClearSessionID()

ClearSessionID clears the value of the "session_id" field.

func (*ClassificationAnalyticsMutation) ClearedEdges added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) ClearedFields added in v1.12.0

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

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

func (ClassificationAnalyticsMutation) Client added in v1.12.0

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 (*ClassificationAnalyticsMutation) CommandCategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandCategory() (r string, exists bool)

CommandCategory returns the value of the "command_category" field in the mutation.

func (*ClassificationAnalyticsMutation) CommandCategoryCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandCategoryCleared() bool

CommandCategoryCleared returns if the "command_category" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) CommandPreview added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandPreview() (r string, exists bool)

CommandPreview returns the value of the "command_preview" field in the mutation.

func (*ClassificationAnalyticsMutation) CommandPreviewCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandPreviewCleared() bool

CommandPreviewCleared returns if the "command_preview" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) CommandProgram added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandProgram() (r string, exists bool)

CommandProgram returns the value of the "command_program" field in the mutation.

func (*ClassificationAnalyticsMutation) CommandProgramCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandProgramCleared() bool

CommandProgramCleared returns if the "command_program" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) CommandSubcategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandSubcategory() (r string, exists bool)

CommandSubcategory returns the value of the "command_subcategory" field in the mutation.

func (*ClassificationAnalyticsMutation) CommandSubcategoryCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) CommandSubcategoryCleared() bool

CommandSubcategoryCleared returns if the "command_subcategory" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) CreatedAt added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) Cwd added in v1.12.0

func (m *ClassificationAnalyticsMutation) Cwd() (r string, exists bool)

Cwd returns the value of the "cwd" field in the mutation.

func (*ClassificationAnalyticsMutation) CwdCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) CwdCleared() bool

CwdCleared returns if the "cwd" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) Decision added in v1.12.0

func (m *ClassificationAnalyticsMutation) Decision() (r string, exists bool)

Decision returns the value of the "decision" field in the mutation.

func (*ClassificationAnalyticsMutation) DurationMs added in v1.12.0

func (m *ClassificationAnalyticsMutation) DurationMs() (r int64, exists bool)

DurationMs returns the value of the "duration_ms" field in the mutation.

func (*ClassificationAnalyticsMutation) EdgeCleared added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) Field added in v1.12.0

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 (*ClassificationAnalyticsMutation) FieldCleared added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) Fields added in v1.12.0

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 (*ClassificationAnalyticsMutation) ID added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) IDs added in v1.12.0

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 (*ClassificationAnalyticsMutation) OldAlternative added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldAlternative(ctx context.Context) (v string, err error)

OldAlternative returns the old "alternative" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldAnalyticsID added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldAnalyticsID(ctx context.Context) (v string, err error)

OldAnalyticsID returns the old "analytics_id" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldApprovalID added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldApprovalID(ctx context.Context) (v string, err error)

OldApprovalID returns the old "approval_id" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldCommandCategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldCommandCategory(ctx context.Context) (v string, err error)

OldCommandCategory returns the old "command_category" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldCommandPreview added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldCommandPreview(ctx context.Context) (v string, err error)

OldCommandPreview returns the old "command_preview" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldCommandProgram added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldCommandProgram(ctx context.Context) (v string, err error)

OldCommandProgram returns the old "command_program" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldCommandSubcategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldCommandSubcategory(ctx context.Context) (v string, err error)

OldCommandSubcategory returns the old "command_subcategory" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldCreatedAt added in v1.12.0

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

OldCreatedAt returns the old "created_at" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldCwd added in v1.12.0

OldCwd returns the old "cwd" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldDecision added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldDecision(ctx context.Context) (v string, err error)

OldDecision returns the old "decision" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldDurationMs added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldDurationMs(ctx context.Context) (v int64, err error)

OldDurationMs returns the old "duration_ms" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldField added in v1.12.0

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 (*ClassificationAnalyticsMutation) OldPythonImports added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldPythonImports(ctx context.Context) (v []string, err error)

OldPythonImports returns the old "python_imports" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldReason added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldReason(ctx context.Context) (v string, err error)

OldReason returns the old "reason" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldRiskLevel added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldRiskLevel(ctx context.Context) (v string, err error)

OldRiskLevel returns the old "risk_level" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldRuleID added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldRuleID(ctx context.Context) (v string, err error)

OldRuleID returns the old "rule_id" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldRuleName added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldRuleName(ctx context.Context) (v string, err error)

OldRuleName returns the old "rule_name" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldSessionID added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldSessionID(ctx context.Context) (v string, err error)

OldSessionID returns the old "session_id" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) OldToolName added in v1.12.0

func (m *ClassificationAnalyticsMutation) OldToolName(ctx context.Context) (v string, err error)

OldToolName returns the old "tool_name" field's value of the ClassificationAnalytics entity. If the ClassificationAnalytics 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 (*ClassificationAnalyticsMutation) Op added in v1.12.0

Op returns the operation name.

func (*ClassificationAnalyticsMutation) PythonImports added in v1.12.0

func (m *ClassificationAnalyticsMutation) PythonImports() (r []string, exists bool)

PythonImports returns the value of the "python_imports" field in the mutation.

func (*ClassificationAnalyticsMutation) PythonImportsCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) PythonImportsCleared() bool

PythonImportsCleared returns if the "python_imports" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) Reason added in v1.12.0

func (m *ClassificationAnalyticsMutation) Reason() (r string, exists bool)

Reason returns the value of the "reason" field in the mutation.

func (*ClassificationAnalyticsMutation) ReasonCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) ReasonCleared() bool

ReasonCleared returns if the "reason" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) RemovedEdges added in v1.12.0

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

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

func (*ClassificationAnalyticsMutation) RemovedIDs added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) ResetAlternative added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetAlternative()

ResetAlternative resets all changes to the "alternative" field.

func (*ClassificationAnalyticsMutation) ResetAnalyticsID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetAnalyticsID()

ResetAnalyticsID resets all changes to the "analytics_id" field.

func (*ClassificationAnalyticsMutation) ResetApprovalID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetApprovalID()

ResetApprovalID resets all changes to the "approval_id" field.

func (*ClassificationAnalyticsMutation) ResetCommandCategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetCommandCategory()

ResetCommandCategory resets all changes to the "command_category" field.

func (*ClassificationAnalyticsMutation) ResetCommandPreview added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetCommandPreview()

ResetCommandPreview resets all changes to the "command_preview" field.

func (*ClassificationAnalyticsMutation) ResetCommandProgram added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetCommandProgram()

ResetCommandProgram resets all changes to the "command_program" field.

func (*ClassificationAnalyticsMutation) ResetCommandSubcategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetCommandSubcategory()

ResetCommandSubcategory resets all changes to the "command_subcategory" field.

func (*ClassificationAnalyticsMutation) ResetCreatedAt added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ClassificationAnalyticsMutation) ResetCwd added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetCwd()

ResetCwd resets all changes to the "cwd" field.

func (*ClassificationAnalyticsMutation) ResetDecision added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetDecision()

ResetDecision resets all changes to the "decision" field.

func (*ClassificationAnalyticsMutation) ResetDurationMs added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetDurationMs()

ResetDurationMs resets all changes to the "duration_ms" field.

func (*ClassificationAnalyticsMutation) ResetEdge added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) ResetField added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) ResetPythonImports added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetPythonImports()

ResetPythonImports resets all changes to the "python_imports" field.

func (*ClassificationAnalyticsMutation) ResetReason added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetReason()

ResetReason resets all changes to the "reason" field.

func (*ClassificationAnalyticsMutation) ResetRiskLevel added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetRiskLevel()

ResetRiskLevel resets all changes to the "risk_level" field.

func (*ClassificationAnalyticsMutation) ResetRuleID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetRuleID()

ResetRuleID resets all changes to the "rule_id" field.

func (*ClassificationAnalyticsMutation) ResetRuleName added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetRuleName()

ResetRuleName resets all changes to the "rule_name" field.

func (*ClassificationAnalyticsMutation) ResetSessionID added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetSessionID()

ResetSessionID resets all changes to the "session_id" field.

func (*ClassificationAnalyticsMutation) ResetToolName added in v1.12.0

func (m *ClassificationAnalyticsMutation) ResetToolName()

ResetToolName resets all changes to the "tool_name" field.

func (*ClassificationAnalyticsMutation) RiskLevel added in v1.12.0

func (m *ClassificationAnalyticsMutation) RiskLevel() (r string, exists bool)

RiskLevel returns the value of the "risk_level" field in the mutation.

func (*ClassificationAnalyticsMutation) RuleID added in v1.12.0

func (m *ClassificationAnalyticsMutation) RuleID() (r string, exists bool)

RuleID returns the value of the "rule_id" field in the mutation.

func (*ClassificationAnalyticsMutation) RuleIDCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) RuleIDCleared() bool

RuleIDCleared returns if the "rule_id" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) RuleName added in v1.12.0

func (m *ClassificationAnalyticsMutation) RuleName() (r string, exists bool)

RuleName returns the value of the "rule_name" field in the mutation.

func (*ClassificationAnalyticsMutation) RuleNameCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) RuleNameCleared() bool

RuleNameCleared returns if the "rule_name" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) SessionID added in v1.12.0

func (m *ClassificationAnalyticsMutation) SessionID() (r string, exists bool)

SessionID returns the value of the "session_id" field in the mutation.

func (*ClassificationAnalyticsMutation) SessionIDCleared added in v1.12.0

func (m *ClassificationAnalyticsMutation) SessionIDCleared() bool

SessionIDCleared returns if the "session_id" field was cleared in this mutation.

func (*ClassificationAnalyticsMutation) SetAlternative added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetAlternative(s string)

SetAlternative sets the "alternative" field.

func (*ClassificationAnalyticsMutation) SetAnalyticsID added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetAnalyticsID(s string)

SetAnalyticsID sets the "analytics_id" field.

func (*ClassificationAnalyticsMutation) SetApprovalID added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetApprovalID(s string)

SetApprovalID sets the "approval_id" field.

func (*ClassificationAnalyticsMutation) SetCommandCategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetCommandCategory(s string)

SetCommandCategory sets the "command_category" field.

func (*ClassificationAnalyticsMutation) SetCommandPreview added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetCommandPreview(s string)

SetCommandPreview sets the "command_preview" field.

func (*ClassificationAnalyticsMutation) SetCommandProgram added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetCommandProgram(s string)

SetCommandProgram sets the "command_program" field.

func (*ClassificationAnalyticsMutation) SetCommandSubcategory added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetCommandSubcategory(s string)

SetCommandSubcategory sets the "command_subcategory" field.

func (*ClassificationAnalyticsMutation) SetCreatedAt added in v1.12.0

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

SetCreatedAt sets the "created_at" field.

func (*ClassificationAnalyticsMutation) SetCwd added in v1.12.0

SetCwd sets the "cwd" field.

func (*ClassificationAnalyticsMutation) SetDecision added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetDecision(s string)

SetDecision sets the "decision" field.

func (*ClassificationAnalyticsMutation) SetDurationMs added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetDurationMs(i int64)

SetDurationMs sets the "duration_ms" field.

func (*ClassificationAnalyticsMutation) SetField added in v1.12.0

func (m *ClassificationAnalyticsMutation) 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 (*ClassificationAnalyticsMutation) SetOp added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ClassificationAnalyticsMutation) SetPythonImports added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetPythonImports(s []string)

SetPythonImports sets the "python_imports" field.

func (*ClassificationAnalyticsMutation) SetReason added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetReason(s string)

SetReason sets the "reason" field.

func (*ClassificationAnalyticsMutation) SetRiskLevel added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetRiskLevel(s string)

SetRiskLevel sets the "risk_level" field.

func (*ClassificationAnalyticsMutation) SetRuleID added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetRuleID(s string)

SetRuleID sets the "rule_id" field.

func (*ClassificationAnalyticsMutation) SetRuleName added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetRuleName(s string)

SetRuleName sets the "rule_name" field.

func (*ClassificationAnalyticsMutation) SetSessionID added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetSessionID(s string)

SetSessionID sets the "session_id" field.

func (*ClassificationAnalyticsMutation) SetToolName added in v1.12.0

func (m *ClassificationAnalyticsMutation) SetToolName(s string)

SetToolName sets the "tool_name" field.

func (*ClassificationAnalyticsMutation) ToolName added in v1.12.0

func (m *ClassificationAnalyticsMutation) ToolName() (r string, exists bool)

ToolName returns the value of the "tool_name" field in the mutation.

func (ClassificationAnalyticsMutation) Tx added in v1.12.0

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

func (*ClassificationAnalyticsMutation) Type added in v1.12.0

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

func (*ClassificationAnalyticsMutation) Where added in v1.12.0

Where appends a list predicates to the ClassificationAnalyticsMutation builder.

func (*ClassificationAnalyticsMutation) WhereP added in v1.12.0

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

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

type ClassificationAnalyticsQuery added in v1.12.0

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

ClassificationAnalyticsQuery is the builder for querying ClassificationAnalytics entities.

func (*ClassificationAnalyticsQuery) Aggregate added in v1.12.0

Aggregate returns a ClassificationAnalyticsSelect configured with the given aggregations.

func (*ClassificationAnalyticsQuery) All added in v1.12.0

All executes the query and returns a list of ClassificationAnalyticsSlice.

func (*ClassificationAnalyticsQuery) AllX added in v1.12.0

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

func (*ClassificationAnalyticsQuery) Clone added in v1.12.0

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

func (*ClassificationAnalyticsQuery) Count added in v1.12.0

Count returns the count of the given query.

func (*ClassificationAnalyticsQuery) CountX added in v1.12.0

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

func (*ClassificationAnalyticsQuery) Exist added in v1.12.0

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

func (*ClassificationAnalyticsQuery) ExistX added in v1.12.0

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

func (*ClassificationAnalyticsQuery) First added in v1.12.0

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

func (*ClassificationAnalyticsQuery) FirstID added in v1.12.0

func (_q *ClassificationAnalyticsQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ClassificationAnalyticsQuery) FirstIDX added in v1.12.0

func (_q *ClassificationAnalyticsQuery) FirstIDX(ctx context.Context) int

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

func (*ClassificationAnalyticsQuery) FirstX added in v1.12.0

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

func (*ClassificationAnalyticsQuery) GroupBy added in v1.12.0

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

client.ClassificationAnalytics.Query().
	GroupBy(classificationanalytics.FieldAnalyticsID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ClassificationAnalyticsQuery) IDs added in v1.12.0

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

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

func (*ClassificationAnalyticsQuery) IDsX added in v1.12.0

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

func (*ClassificationAnalyticsQuery) Limit added in v1.12.0

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

func (*ClassificationAnalyticsQuery) Offset added in v1.12.0

Offset to start from.

func (*ClassificationAnalyticsQuery) Only added in v1.12.0

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

func (*ClassificationAnalyticsQuery) OnlyID added in v1.12.0

func (_q *ClassificationAnalyticsQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ClassificationAnalyticsQuery) OnlyIDX added in v1.12.0

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

func (*ClassificationAnalyticsQuery) OnlyX added in v1.12.0

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

func (*ClassificationAnalyticsQuery) Order added in v1.12.0

Order specifies how the records should be ordered.

func (*ClassificationAnalyticsQuery) Select added in v1.12.0

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

client.ClassificationAnalytics.Query().
	Select(classificationanalytics.FieldAnalyticsID).
	Scan(ctx, &v)

func (*ClassificationAnalyticsQuery) Unique added in v1.12.0

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 (*ClassificationAnalyticsQuery) Where added in v1.12.0

Where adds a new predicate for the ClassificationAnalyticsQuery builder.

type ClassificationAnalyticsSelect added in v1.12.0

type ClassificationAnalyticsSelect struct {
	*ClassificationAnalyticsQuery
	// contains filtered or unexported fields
}

ClassificationAnalyticsSelect is the builder for selecting fields of ClassificationAnalytics entities.

func (*ClassificationAnalyticsSelect) Aggregate added in v1.12.0

Aggregate adds the given aggregation functions to the selector query.

func (*ClassificationAnalyticsSelect) Bool added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) BoolX added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Bools added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) BoolsX added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Float64 added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Float64X added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Float64s added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Float64sX added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Int added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) IntX added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Ints added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) IntsX added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Scan added in v1.12.0

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

func (*ClassificationAnalyticsSelect) ScanX added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) String added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) StringX added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) Strings added in v1.12.0

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

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

func (*ClassificationAnalyticsSelect) StringsX added in v1.12.0

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

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

type ClassificationAnalyticsSlice added in v1.12.0

type ClassificationAnalyticsSlice []*ClassificationAnalytics

ClassificationAnalyticsSlice is a parsable slice of ClassificationAnalytics.

type ClassificationAnalyticsUpdate added in v1.12.0

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

ClassificationAnalyticsUpdate is the builder for updating ClassificationAnalytics entities.

func (*ClassificationAnalyticsUpdate) AddDurationMs added in v1.12.0

AddDurationMs adds value to the "duration_ms" field.

func (*ClassificationAnalyticsUpdate) AppendPythonImports added in v1.12.0

AppendPythonImports appends value to the "python_imports" field.

func (*ClassificationAnalyticsUpdate) ClearAlternative added in v1.12.0

ClearAlternative clears the value of the "alternative" field.

func (*ClassificationAnalyticsUpdate) ClearApprovalID added in v1.12.0

ClearApprovalID clears the value of the "approval_id" field.

func (*ClassificationAnalyticsUpdate) ClearCommandCategory added in v1.12.0

ClearCommandCategory clears the value of the "command_category" field.

func (*ClassificationAnalyticsUpdate) ClearCommandPreview added in v1.12.0

ClearCommandPreview clears the value of the "command_preview" field.

func (*ClassificationAnalyticsUpdate) ClearCommandProgram added in v1.12.0

ClearCommandProgram clears the value of the "command_program" field.

func (*ClassificationAnalyticsUpdate) ClearCommandSubcategory added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) ClearCommandSubcategory() *ClassificationAnalyticsUpdate

ClearCommandSubcategory clears the value of the "command_subcategory" field.

func (*ClassificationAnalyticsUpdate) ClearCwd added in v1.12.0

ClearCwd clears the value of the "cwd" field.

func (*ClassificationAnalyticsUpdate) ClearPythonImports added in v1.12.0

ClearPythonImports clears the value of the "python_imports" field.

func (*ClassificationAnalyticsUpdate) ClearReason added in v1.12.0

ClearReason clears the value of the "reason" field.

func (*ClassificationAnalyticsUpdate) ClearRuleID added in v1.12.0

ClearRuleID clears the value of the "rule_id" field.

func (*ClassificationAnalyticsUpdate) ClearRuleName added in v1.12.0

ClearRuleName clears the value of the "rule_name" field.

func (*ClassificationAnalyticsUpdate) ClearSessionID added in v1.12.0

ClearSessionID clears the value of the "session_id" field.

func (*ClassificationAnalyticsUpdate) Exec added in v1.12.0

Exec executes the query.

func (*ClassificationAnalyticsUpdate) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsUpdate) Mutation added in v1.12.0

Mutation returns the ClassificationAnalyticsMutation object of the builder.

func (*ClassificationAnalyticsUpdate) Save added in v1.12.0

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

func (*ClassificationAnalyticsUpdate) SaveX added in v1.12.0

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

func (*ClassificationAnalyticsUpdate) SetAlternative added in v1.12.0

SetAlternative sets the "alternative" field.

func (*ClassificationAnalyticsUpdate) SetAnalyticsID added in v1.12.0

SetAnalyticsID sets the "analytics_id" field.

func (*ClassificationAnalyticsUpdate) SetApprovalID added in v1.12.0

SetApprovalID sets the "approval_id" field.

func (*ClassificationAnalyticsUpdate) SetCommandCategory added in v1.12.0

SetCommandCategory sets the "command_category" field.

func (*ClassificationAnalyticsUpdate) SetCommandPreview added in v1.12.0

SetCommandPreview sets the "command_preview" field.

func (*ClassificationAnalyticsUpdate) SetCommandProgram added in v1.12.0

SetCommandProgram sets the "command_program" field.

func (*ClassificationAnalyticsUpdate) SetCommandSubcategory added in v1.12.0

SetCommandSubcategory sets the "command_subcategory" field.

func (*ClassificationAnalyticsUpdate) SetCwd added in v1.12.0

SetCwd sets the "cwd" field.

func (*ClassificationAnalyticsUpdate) SetDecision added in v1.12.0

SetDecision sets the "decision" field.

func (*ClassificationAnalyticsUpdate) SetDurationMs added in v1.12.0

SetDurationMs sets the "duration_ms" field.

func (*ClassificationAnalyticsUpdate) SetNillableAlternative added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) SetNillableAlternative(v *string) *ClassificationAnalyticsUpdate

SetNillableAlternative sets the "alternative" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableAnalyticsID added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) SetNillableAnalyticsID(v *string) *ClassificationAnalyticsUpdate

SetNillableAnalyticsID sets the "analytics_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableApprovalID added in v1.12.0

SetNillableApprovalID sets the "approval_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableCommandCategory added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) SetNillableCommandCategory(v *string) *ClassificationAnalyticsUpdate

SetNillableCommandCategory sets the "command_category" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableCommandPreview added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) SetNillableCommandPreview(v *string) *ClassificationAnalyticsUpdate

SetNillableCommandPreview sets the "command_preview" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableCommandProgram added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) SetNillableCommandProgram(v *string) *ClassificationAnalyticsUpdate

SetNillableCommandProgram sets the "command_program" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableCommandSubcategory added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) SetNillableCommandSubcategory(v *string) *ClassificationAnalyticsUpdate

SetNillableCommandSubcategory sets the "command_subcategory" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableCwd added in v1.12.0

SetNillableCwd sets the "cwd" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableDecision added in v1.12.0

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableDurationMs added in v1.12.0

func (_u *ClassificationAnalyticsUpdate) SetNillableDurationMs(v *int64) *ClassificationAnalyticsUpdate

SetNillableDurationMs sets the "duration_ms" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableReason added in v1.12.0

SetNillableReason sets the "reason" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableRiskLevel added in v1.12.0

SetNillableRiskLevel sets the "risk_level" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableRuleID added in v1.12.0

SetNillableRuleID sets the "rule_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableRuleName added in v1.12.0

SetNillableRuleName sets the "rule_name" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableSessionID added in v1.12.0

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetNillableToolName added in v1.12.0

SetNillableToolName sets the "tool_name" field if the given value is not nil.

func (*ClassificationAnalyticsUpdate) SetPythonImports added in v1.12.0

SetPythonImports sets the "python_imports" field.

func (*ClassificationAnalyticsUpdate) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ClassificationAnalyticsUpdate) SetRiskLevel added in v1.12.0

SetRiskLevel sets the "risk_level" field.

func (*ClassificationAnalyticsUpdate) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ClassificationAnalyticsUpdate) SetRuleName added in v1.12.0

SetRuleName sets the "rule_name" field.

func (*ClassificationAnalyticsUpdate) SetSessionID added in v1.12.0

SetSessionID sets the "session_id" field.

func (*ClassificationAnalyticsUpdate) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ClassificationAnalyticsUpdate) Where added in v1.12.0

Where appends a list predicates to the ClassificationAnalyticsUpdate builder.

type ClassificationAnalyticsUpdateOne added in v1.12.0

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

ClassificationAnalyticsUpdateOne is the builder for updating a single ClassificationAnalytics entity.

func (*ClassificationAnalyticsUpdateOne) AddDurationMs added in v1.12.0

AddDurationMs adds value to the "duration_ms" field.

func (*ClassificationAnalyticsUpdateOne) AppendPythonImports added in v1.12.0

AppendPythonImports appends value to the "python_imports" field.

func (*ClassificationAnalyticsUpdateOne) ClearAlternative added in v1.12.0

ClearAlternative clears the value of the "alternative" field.

func (*ClassificationAnalyticsUpdateOne) ClearApprovalID added in v1.12.0

ClearApprovalID clears the value of the "approval_id" field.

func (*ClassificationAnalyticsUpdateOne) ClearCommandCategory added in v1.12.0

ClearCommandCategory clears the value of the "command_category" field.

func (*ClassificationAnalyticsUpdateOne) ClearCommandPreview added in v1.12.0

ClearCommandPreview clears the value of the "command_preview" field.

func (*ClassificationAnalyticsUpdateOne) ClearCommandProgram added in v1.12.0

ClearCommandProgram clears the value of the "command_program" field.

func (*ClassificationAnalyticsUpdateOne) ClearCommandSubcategory added in v1.12.0

ClearCommandSubcategory clears the value of the "command_subcategory" field.

func (*ClassificationAnalyticsUpdateOne) ClearCwd added in v1.12.0

ClearCwd clears the value of the "cwd" field.

func (*ClassificationAnalyticsUpdateOne) ClearPythonImports added in v1.12.0

ClearPythonImports clears the value of the "python_imports" field.

func (*ClassificationAnalyticsUpdateOne) ClearReason added in v1.12.0

ClearReason clears the value of the "reason" field.

func (*ClassificationAnalyticsUpdateOne) ClearRuleID added in v1.12.0

ClearRuleID clears the value of the "rule_id" field.

func (*ClassificationAnalyticsUpdateOne) ClearRuleName added in v1.12.0

ClearRuleName clears the value of the "rule_name" field.

func (*ClassificationAnalyticsUpdateOne) ClearSessionID added in v1.12.0

ClearSessionID clears the value of the "session_id" field.

func (*ClassificationAnalyticsUpdateOne) Exec added in v1.12.0

Exec executes the query on the entity.

func (*ClassificationAnalyticsUpdateOne) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsUpdateOne) Mutation added in v1.12.0

Mutation returns the ClassificationAnalyticsMutation object of the builder.

func (*ClassificationAnalyticsUpdateOne) Save added in v1.12.0

Save executes the query and returns the updated ClassificationAnalytics entity.

func (*ClassificationAnalyticsUpdateOne) SaveX added in v1.12.0

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

func (*ClassificationAnalyticsUpdateOne) Select added in v1.12.0

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

func (*ClassificationAnalyticsUpdateOne) SetAlternative added in v1.12.0

SetAlternative sets the "alternative" field.

func (*ClassificationAnalyticsUpdateOne) SetAnalyticsID added in v1.12.0

SetAnalyticsID sets the "analytics_id" field.

func (*ClassificationAnalyticsUpdateOne) SetApprovalID added in v1.12.0

SetApprovalID sets the "approval_id" field.

func (*ClassificationAnalyticsUpdateOne) SetCommandCategory added in v1.12.0

SetCommandCategory sets the "command_category" field.

func (*ClassificationAnalyticsUpdateOne) SetCommandPreview added in v1.12.0

SetCommandPreview sets the "command_preview" field.

func (*ClassificationAnalyticsUpdateOne) SetCommandProgram added in v1.12.0

SetCommandProgram sets the "command_program" field.

func (*ClassificationAnalyticsUpdateOne) SetCommandSubcategory added in v1.12.0

SetCommandSubcategory sets the "command_subcategory" field.

func (*ClassificationAnalyticsUpdateOne) SetCwd added in v1.12.0

SetCwd sets the "cwd" field.

func (*ClassificationAnalyticsUpdateOne) SetDecision added in v1.12.0

SetDecision sets the "decision" field.

func (*ClassificationAnalyticsUpdateOne) SetDurationMs added in v1.12.0

SetDurationMs sets the "duration_ms" field.

func (*ClassificationAnalyticsUpdateOne) SetNillableAlternative added in v1.12.0

SetNillableAlternative sets the "alternative" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableAnalyticsID added in v1.12.0

SetNillableAnalyticsID sets the "analytics_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableApprovalID added in v1.12.0

SetNillableApprovalID sets the "approval_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableCommandCategory added in v1.12.0

func (_u *ClassificationAnalyticsUpdateOne) SetNillableCommandCategory(v *string) *ClassificationAnalyticsUpdateOne

SetNillableCommandCategory sets the "command_category" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableCommandPreview added in v1.12.0

SetNillableCommandPreview sets the "command_preview" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableCommandProgram added in v1.12.0

SetNillableCommandProgram sets the "command_program" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableCommandSubcategory added in v1.12.0

func (_u *ClassificationAnalyticsUpdateOne) SetNillableCommandSubcategory(v *string) *ClassificationAnalyticsUpdateOne

SetNillableCommandSubcategory sets the "command_subcategory" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableCwd added in v1.12.0

SetNillableCwd sets the "cwd" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableDecision added in v1.12.0

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableDurationMs added in v1.12.0

SetNillableDurationMs sets the "duration_ms" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableReason added in v1.12.0

SetNillableReason sets the "reason" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableRiskLevel added in v1.12.0

SetNillableRiskLevel sets the "risk_level" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableRuleID added in v1.12.0

SetNillableRuleID sets the "rule_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableRuleName added in v1.12.0

SetNillableRuleName sets the "rule_name" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableSessionID added in v1.12.0

SetNillableSessionID sets the "session_id" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetNillableToolName added in v1.12.0

SetNillableToolName sets the "tool_name" field if the given value is not nil.

func (*ClassificationAnalyticsUpdateOne) SetPythonImports added in v1.12.0

SetPythonImports sets the "python_imports" field.

func (*ClassificationAnalyticsUpdateOne) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ClassificationAnalyticsUpdateOne) SetRiskLevel added in v1.12.0

SetRiskLevel sets the "risk_level" field.

func (*ClassificationAnalyticsUpdateOne) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ClassificationAnalyticsUpdateOne) SetRuleName added in v1.12.0

SetRuleName sets the "rule_name" field.

func (*ClassificationAnalyticsUpdateOne) SetSessionID added in v1.12.0

SetSessionID sets the "session_id" field.

func (*ClassificationAnalyticsUpdateOne) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ClassificationAnalyticsUpdateOne) Where added in v1.12.0

Where appends a list predicates to the ClassificationAnalyticsUpdate builder.

type ClassificationAnalyticsUpsert added in v1.12.0

type ClassificationAnalyticsUpsert struct {
	*sql.UpdateSet
}

ClassificationAnalyticsUpsert is the "OnConflict" setter.

func (*ClassificationAnalyticsUpsert) AddDurationMs added in v1.12.0

AddDurationMs adds v to the "duration_ms" field.

func (*ClassificationAnalyticsUpsert) ClearAlternative added in v1.12.0

ClearAlternative clears the value of the "alternative" field.

func (*ClassificationAnalyticsUpsert) ClearApprovalID added in v1.12.0

ClearApprovalID clears the value of the "approval_id" field.

func (*ClassificationAnalyticsUpsert) ClearCommandCategory added in v1.12.0

ClearCommandCategory clears the value of the "command_category" field.

func (*ClassificationAnalyticsUpsert) ClearCommandPreview added in v1.12.0

ClearCommandPreview clears the value of the "command_preview" field.

func (*ClassificationAnalyticsUpsert) ClearCommandProgram added in v1.12.0

ClearCommandProgram clears the value of the "command_program" field.

func (*ClassificationAnalyticsUpsert) ClearCommandSubcategory added in v1.12.0

func (u *ClassificationAnalyticsUpsert) ClearCommandSubcategory() *ClassificationAnalyticsUpsert

ClearCommandSubcategory clears the value of the "command_subcategory" field.

func (*ClassificationAnalyticsUpsert) ClearCwd added in v1.12.0

ClearCwd clears the value of the "cwd" field.

func (*ClassificationAnalyticsUpsert) ClearPythonImports added in v1.12.0

ClearPythonImports clears the value of the "python_imports" field.

func (*ClassificationAnalyticsUpsert) ClearReason added in v1.12.0

ClearReason clears the value of the "reason" field.

func (*ClassificationAnalyticsUpsert) ClearRuleID added in v1.12.0

ClearRuleID clears the value of the "rule_id" field.

func (*ClassificationAnalyticsUpsert) ClearRuleName added in v1.12.0

ClearRuleName clears the value of the "rule_name" field.

func (*ClassificationAnalyticsUpsert) ClearSessionID added in v1.12.0

ClearSessionID clears the value of the "session_id" field.

func (*ClassificationAnalyticsUpsert) SetAlternative added in v1.12.0

SetAlternative sets the "alternative" field.

func (*ClassificationAnalyticsUpsert) SetAnalyticsID added in v1.12.0

SetAnalyticsID sets the "analytics_id" field.

func (*ClassificationAnalyticsUpsert) SetApprovalID added in v1.12.0

SetApprovalID sets the "approval_id" field.

func (*ClassificationAnalyticsUpsert) SetCommandCategory added in v1.12.0

SetCommandCategory sets the "command_category" field.

func (*ClassificationAnalyticsUpsert) SetCommandPreview added in v1.12.0

SetCommandPreview sets the "command_preview" field.

func (*ClassificationAnalyticsUpsert) SetCommandProgram added in v1.12.0

SetCommandProgram sets the "command_program" field.

func (*ClassificationAnalyticsUpsert) SetCommandSubcategory added in v1.12.0

SetCommandSubcategory sets the "command_subcategory" field.

func (*ClassificationAnalyticsUpsert) SetCwd added in v1.12.0

SetCwd sets the "cwd" field.

func (*ClassificationAnalyticsUpsert) SetDecision added in v1.12.0

SetDecision sets the "decision" field.

func (*ClassificationAnalyticsUpsert) SetDurationMs added in v1.12.0

SetDurationMs sets the "duration_ms" field.

func (*ClassificationAnalyticsUpsert) SetPythonImports added in v1.12.0

SetPythonImports sets the "python_imports" field.

func (*ClassificationAnalyticsUpsert) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ClassificationAnalyticsUpsert) SetRiskLevel added in v1.12.0

SetRiskLevel sets the "risk_level" field.

func (*ClassificationAnalyticsUpsert) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ClassificationAnalyticsUpsert) SetRuleName added in v1.12.0

SetRuleName sets the "rule_name" field.

func (*ClassificationAnalyticsUpsert) SetSessionID added in v1.12.0

SetSessionID sets the "session_id" field.

func (*ClassificationAnalyticsUpsert) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ClassificationAnalyticsUpsert) UpdateAlternative added in v1.12.0

UpdateAlternative sets the "alternative" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateAnalyticsID added in v1.12.0

UpdateAnalyticsID sets the "analytics_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateApprovalID added in v1.12.0

UpdateApprovalID sets the "approval_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateCommandCategory added in v1.12.0

UpdateCommandCategory sets the "command_category" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateCommandPreview added in v1.12.0

UpdateCommandPreview sets the "command_preview" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateCommandProgram added in v1.12.0

UpdateCommandProgram sets the "command_program" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateCommandSubcategory added in v1.12.0

func (u *ClassificationAnalyticsUpsert) UpdateCommandSubcategory() *ClassificationAnalyticsUpsert

UpdateCommandSubcategory sets the "command_subcategory" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateCwd added in v1.12.0

UpdateCwd sets the "cwd" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateDecision added in v1.12.0

UpdateDecision sets the "decision" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateDurationMs added in v1.12.0

UpdateDurationMs sets the "duration_ms" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdatePythonImports added in v1.12.0

UpdatePythonImports sets the "python_imports" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateReason added in v1.12.0

UpdateReason sets the "reason" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateRiskLevel added in v1.12.0

UpdateRiskLevel sets the "risk_level" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateRuleID added in v1.12.0

UpdateRuleID sets the "rule_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateRuleName added in v1.12.0

UpdateRuleName sets the "rule_name" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateSessionID added in v1.12.0

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsert) UpdateToolName added in v1.12.0

UpdateToolName sets the "tool_name" field to the value that was provided on create.

type ClassificationAnalyticsUpsertBulk added in v1.12.0

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

ClassificationAnalyticsUpsertBulk is the builder for "upsert"-ing a bulk of ClassificationAnalytics nodes.

func (*ClassificationAnalyticsUpsertBulk) AddDurationMs added in v1.12.0

AddDurationMs adds v to the "duration_ms" field.

func (*ClassificationAnalyticsUpsertBulk) ClearAlternative added in v1.12.0

ClearAlternative clears the value of the "alternative" field.

func (*ClassificationAnalyticsUpsertBulk) ClearApprovalID added in v1.12.0

ClearApprovalID clears the value of the "approval_id" field.

func (*ClassificationAnalyticsUpsertBulk) ClearCommandCategory added in v1.12.0

ClearCommandCategory clears the value of the "command_category" field.

func (*ClassificationAnalyticsUpsertBulk) ClearCommandPreview added in v1.12.0

ClearCommandPreview clears the value of the "command_preview" field.

func (*ClassificationAnalyticsUpsertBulk) ClearCommandProgram added in v1.12.0

ClearCommandProgram clears the value of the "command_program" field.

func (*ClassificationAnalyticsUpsertBulk) ClearCommandSubcategory added in v1.12.0

ClearCommandSubcategory clears the value of the "command_subcategory" field.

func (*ClassificationAnalyticsUpsertBulk) ClearCwd added in v1.12.0

ClearCwd clears the value of the "cwd" field.

func (*ClassificationAnalyticsUpsertBulk) ClearPythonImports added in v1.12.0

ClearPythonImports clears the value of the "python_imports" field.

func (*ClassificationAnalyticsUpsertBulk) ClearReason added in v1.12.0

ClearReason clears the value of the "reason" field.

func (*ClassificationAnalyticsUpsertBulk) ClearRuleID added in v1.12.0

ClearRuleID clears the value of the "rule_id" field.

func (*ClassificationAnalyticsUpsertBulk) ClearRuleName added in v1.12.0

ClearRuleName clears the value of the "rule_name" field.

func (*ClassificationAnalyticsUpsertBulk) ClearSessionID added in v1.12.0

ClearSessionID clears the value of the "session_id" field.

func (*ClassificationAnalyticsUpsertBulk) DoNothing added in v1.12.0

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

func (*ClassificationAnalyticsUpsertBulk) Exec added in v1.12.0

Exec executes the query.

func (*ClassificationAnalyticsUpsertBulk) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsUpsertBulk) Ignore added in v1.12.0

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

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

func (*ClassificationAnalyticsUpsertBulk) SetAlternative added in v1.12.0

SetAlternative sets the "alternative" field.

func (*ClassificationAnalyticsUpsertBulk) SetAnalyticsID added in v1.12.0

SetAnalyticsID sets the "analytics_id" field.

func (*ClassificationAnalyticsUpsertBulk) SetApprovalID added in v1.12.0

SetApprovalID sets the "approval_id" field.

func (*ClassificationAnalyticsUpsertBulk) SetCommandCategory added in v1.12.0

SetCommandCategory sets the "command_category" field.

func (*ClassificationAnalyticsUpsertBulk) SetCommandPreview added in v1.12.0

SetCommandPreview sets the "command_preview" field.

func (*ClassificationAnalyticsUpsertBulk) SetCommandProgram added in v1.12.0

SetCommandProgram sets the "command_program" field.

func (*ClassificationAnalyticsUpsertBulk) SetCommandSubcategory added in v1.12.0

SetCommandSubcategory sets the "command_subcategory" field.

func (*ClassificationAnalyticsUpsertBulk) SetCwd added in v1.12.0

SetCwd sets the "cwd" field.

func (*ClassificationAnalyticsUpsertBulk) SetDecision added in v1.12.0

SetDecision sets the "decision" field.

func (*ClassificationAnalyticsUpsertBulk) SetDurationMs added in v1.12.0

SetDurationMs sets the "duration_ms" field.

func (*ClassificationAnalyticsUpsertBulk) SetPythonImports added in v1.12.0

SetPythonImports sets the "python_imports" field.

func (*ClassificationAnalyticsUpsertBulk) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ClassificationAnalyticsUpsertBulk) SetRiskLevel added in v1.12.0

SetRiskLevel sets the "risk_level" field.

func (*ClassificationAnalyticsUpsertBulk) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ClassificationAnalyticsUpsertBulk) SetRuleName added in v1.12.0

SetRuleName sets the "rule_name" field.

func (*ClassificationAnalyticsUpsertBulk) SetSessionID added in v1.12.0

SetSessionID sets the "session_id" field.

func (*ClassificationAnalyticsUpsertBulk) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ClassificationAnalyticsUpsertBulk) Update added in v1.12.0

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

func (*ClassificationAnalyticsUpsertBulk) UpdateAlternative added in v1.12.0

UpdateAlternative sets the "alternative" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateAnalyticsID added in v1.12.0

UpdateAnalyticsID sets the "analytics_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateApprovalID added in v1.12.0

UpdateApprovalID sets the "approval_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateCommandCategory added in v1.12.0

UpdateCommandCategory sets the "command_category" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateCommandPreview added in v1.12.0

UpdateCommandPreview sets the "command_preview" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateCommandProgram added in v1.12.0

UpdateCommandProgram sets the "command_program" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateCommandSubcategory added in v1.12.0

UpdateCommandSubcategory sets the "command_subcategory" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateCwd added in v1.12.0

UpdateCwd sets the "cwd" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateDecision added in v1.12.0

UpdateDecision sets the "decision" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateDurationMs added in v1.12.0

UpdateDurationMs sets the "duration_ms" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateNewValues added in v1.12.0

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

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

func (*ClassificationAnalyticsUpsertBulk) UpdatePythonImports added in v1.12.0

UpdatePythonImports sets the "python_imports" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateReason added in v1.12.0

UpdateReason sets the "reason" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateRiskLevel added in v1.12.0

UpdateRiskLevel sets the "risk_level" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateRuleID added in v1.12.0

UpdateRuleID sets the "rule_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateRuleName added in v1.12.0

UpdateRuleName sets the "rule_name" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateSessionID added in v1.12.0

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertBulk) UpdateToolName added in v1.12.0

UpdateToolName sets the "tool_name" field to the value that was provided on create.

type ClassificationAnalyticsUpsertOne added in v1.12.0

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

ClassificationAnalyticsUpsertOne is the builder for "upsert"-ing

one ClassificationAnalytics node.

func (*ClassificationAnalyticsUpsertOne) AddDurationMs added in v1.12.0

AddDurationMs adds v to the "duration_ms" field.

func (*ClassificationAnalyticsUpsertOne) ClearAlternative added in v1.12.0

ClearAlternative clears the value of the "alternative" field.

func (*ClassificationAnalyticsUpsertOne) ClearApprovalID added in v1.12.0

ClearApprovalID clears the value of the "approval_id" field.

func (*ClassificationAnalyticsUpsertOne) ClearCommandCategory added in v1.12.0

ClearCommandCategory clears the value of the "command_category" field.

func (*ClassificationAnalyticsUpsertOne) ClearCommandPreview added in v1.12.0

ClearCommandPreview clears the value of the "command_preview" field.

func (*ClassificationAnalyticsUpsertOne) ClearCommandProgram added in v1.12.0

ClearCommandProgram clears the value of the "command_program" field.

func (*ClassificationAnalyticsUpsertOne) ClearCommandSubcategory added in v1.12.0

ClearCommandSubcategory clears the value of the "command_subcategory" field.

func (*ClassificationAnalyticsUpsertOne) ClearCwd added in v1.12.0

ClearCwd clears the value of the "cwd" field.

func (*ClassificationAnalyticsUpsertOne) ClearPythonImports added in v1.12.0

ClearPythonImports clears the value of the "python_imports" field.

func (*ClassificationAnalyticsUpsertOne) ClearReason added in v1.12.0

ClearReason clears the value of the "reason" field.

func (*ClassificationAnalyticsUpsertOne) ClearRuleID added in v1.12.0

ClearRuleID clears the value of the "rule_id" field.

func (*ClassificationAnalyticsUpsertOne) ClearRuleName added in v1.12.0

ClearRuleName clears the value of the "rule_name" field.

func (*ClassificationAnalyticsUpsertOne) ClearSessionID added in v1.12.0

ClearSessionID clears the value of the "session_id" field.

func (*ClassificationAnalyticsUpsertOne) DoNothing added in v1.12.0

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

func (*ClassificationAnalyticsUpsertOne) Exec added in v1.12.0

Exec executes the query.

func (*ClassificationAnalyticsUpsertOne) ExecX added in v1.12.0

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

func (*ClassificationAnalyticsUpsertOne) ID added in v1.12.0

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

func (*ClassificationAnalyticsUpsertOne) IDX added in v1.12.0

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

func (*ClassificationAnalyticsUpsertOne) Ignore added in v1.12.0

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

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

func (*ClassificationAnalyticsUpsertOne) SetAlternative added in v1.12.0

SetAlternative sets the "alternative" field.

func (*ClassificationAnalyticsUpsertOne) SetAnalyticsID added in v1.12.0

SetAnalyticsID sets the "analytics_id" field.

func (*ClassificationAnalyticsUpsertOne) SetApprovalID added in v1.12.0

SetApprovalID sets the "approval_id" field.

func (*ClassificationAnalyticsUpsertOne) SetCommandCategory added in v1.12.0

SetCommandCategory sets the "command_category" field.

func (*ClassificationAnalyticsUpsertOne) SetCommandPreview added in v1.12.0

SetCommandPreview sets the "command_preview" field.

func (*ClassificationAnalyticsUpsertOne) SetCommandProgram added in v1.12.0

SetCommandProgram sets the "command_program" field.

func (*ClassificationAnalyticsUpsertOne) SetCommandSubcategory added in v1.12.0

SetCommandSubcategory sets the "command_subcategory" field.

func (*ClassificationAnalyticsUpsertOne) SetCwd added in v1.12.0

SetCwd sets the "cwd" field.

func (*ClassificationAnalyticsUpsertOne) SetDecision added in v1.12.0

SetDecision sets the "decision" field.

func (*ClassificationAnalyticsUpsertOne) SetDurationMs added in v1.12.0

SetDurationMs sets the "duration_ms" field.

func (*ClassificationAnalyticsUpsertOne) SetPythonImports added in v1.12.0

SetPythonImports sets the "python_imports" field.

func (*ClassificationAnalyticsUpsertOne) SetReason added in v1.12.0

SetReason sets the "reason" field.

func (*ClassificationAnalyticsUpsertOne) SetRiskLevel added in v1.12.0

SetRiskLevel sets the "risk_level" field.

func (*ClassificationAnalyticsUpsertOne) SetRuleID added in v1.12.0

SetRuleID sets the "rule_id" field.

func (*ClassificationAnalyticsUpsertOne) SetRuleName added in v1.12.0

SetRuleName sets the "rule_name" field.

func (*ClassificationAnalyticsUpsertOne) SetSessionID added in v1.12.0

SetSessionID sets the "session_id" field.

func (*ClassificationAnalyticsUpsertOne) SetToolName added in v1.12.0

SetToolName sets the "tool_name" field.

func (*ClassificationAnalyticsUpsertOne) Update added in v1.12.0

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

func (*ClassificationAnalyticsUpsertOne) UpdateAlternative added in v1.12.0

UpdateAlternative sets the "alternative" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateAnalyticsID added in v1.12.0

UpdateAnalyticsID sets the "analytics_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateApprovalID added in v1.12.0

UpdateApprovalID sets the "approval_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateCommandCategory added in v1.12.0

UpdateCommandCategory sets the "command_category" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateCommandPreview added in v1.12.0

UpdateCommandPreview sets the "command_preview" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateCommandProgram added in v1.12.0

UpdateCommandProgram sets the "command_program" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateCommandSubcategory added in v1.12.0

UpdateCommandSubcategory sets the "command_subcategory" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateCwd added in v1.12.0

UpdateCwd sets the "cwd" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateDecision added in v1.12.0

UpdateDecision sets the "decision" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateDurationMs added in v1.12.0

UpdateDurationMs sets the "duration_ms" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateNewValues added in v1.12.0

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

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

func (*ClassificationAnalyticsUpsertOne) UpdatePythonImports added in v1.12.0

UpdatePythonImports sets the "python_imports" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateReason added in v1.12.0

UpdateReason sets the "reason" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateRiskLevel added in v1.12.0

UpdateRiskLevel sets the "risk_level" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateRuleID added in v1.12.0

UpdateRuleID sets the "rule_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateRuleName added in v1.12.0

UpdateRuleName sets the "rule_name" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateSessionID added in v1.12.0

UpdateSessionID sets the "session_id" field to the value that was provided on create.

func (*ClassificationAnalyticsUpsertOne) UpdateToolName added in v1.12.0

UpdateToolName sets the "tool_name" field to the value that was provided on create.

type ClaudeMetadata

type ClaudeMetadata struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ClaudeMetadataQuery when eager-loading is set.
	Edges ClaudeMetadataEdges `json:"edges"`
	// contains filtered or unexported fields
}

ClaudeMetadata is the model entity for the ClaudeMetadata schema.

func (*ClaudeMetadata) GetValue

func (_m *ClaudeMetadata) GetValue(name string) (ent.Value, error)

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

func (*ClaudeMetadata) QueryClaudeSession

func (_m *ClaudeMetadata) QueryClaudeSession() *ClaudeSessionQuery

QueryClaudeSession queries the "claude_session" edge of the ClaudeMetadata entity.

func (*ClaudeMetadata) String

func (_m *ClaudeMetadata) String() string

String implements the fmt.Stringer.

func (*ClaudeMetadata) Unwrap

func (_m *ClaudeMetadata) Unwrap() *ClaudeMetadata

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

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

type ClaudeMetadataClient

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

ClaudeMetadataClient is a client for the ClaudeMetadata schema.

func NewClaudeMetadataClient

func NewClaudeMetadataClient(c config) *ClaudeMetadataClient

NewClaudeMetadataClient returns a client for the ClaudeMetadata from the given config.

func (*ClaudeMetadataClient) Create

Create returns a builder for creating a ClaudeMetadata entity.

func (*ClaudeMetadataClient) CreateBulk

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

func (*ClaudeMetadataClient) Delete

Delete returns a delete builder for ClaudeMetadata.

func (*ClaudeMetadataClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ClaudeMetadataClient) DeleteOneID

func (c *ClaudeMetadataClient) DeleteOneID(id int) *ClaudeMetadataDeleteOne

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

func (*ClaudeMetadataClient) Get

Get returns a ClaudeMetadata entity by its id.

func (*ClaudeMetadataClient) GetX

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

func (*ClaudeMetadataClient) Hooks

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

Hooks returns the client hooks.

func (*ClaudeMetadataClient) Intercept

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

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

func (*ClaudeMetadataClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ClaudeMetadataClient) MapCreateBulk

func (c *ClaudeMetadataClient) MapCreateBulk(slice any, setFunc func(*ClaudeMetadataCreate, int)) *ClaudeMetadataCreateBulk

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

Query returns a query builder for ClaudeMetadata.

func (*ClaudeMetadataClient) QueryClaudeSession

func (c *ClaudeMetadataClient) QueryClaudeSession(_m *ClaudeMetadata) *ClaudeSessionQuery

QueryClaudeSession queries the claude_session edge of a ClaudeMetadata.

func (*ClaudeMetadataClient) Update

Update returns an update builder for ClaudeMetadata.

func (*ClaudeMetadataClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ClaudeMetadataClient) UpdateOneID

func (c *ClaudeMetadataClient) UpdateOneID(id int) *ClaudeMetadataUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ClaudeMetadataClient) Use

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

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

type ClaudeMetadataCreate

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

ClaudeMetadataCreate is the builder for creating a ClaudeMetadata entity.

func (*ClaudeMetadataCreate) Exec

func (_c *ClaudeMetadataCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClaudeMetadataCreate) ExecX

func (_c *ClaudeMetadataCreate) ExecX(ctx context.Context)

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

func (*ClaudeMetadataCreate) Mutation

Mutation returns the ClaudeMetadataMutation object of the builder.

func (*ClaudeMetadataCreate) OnConflict added in v1.12.0

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

client.ClaudeMetadata.Create().
	SetKey(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.ClaudeMetadataUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*ClaudeMetadataCreate) OnConflictColumns added in v1.12.0

func (_c *ClaudeMetadataCreate) OnConflictColumns(columns ...string) *ClaudeMetadataUpsertOne

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

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

func (*ClaudeMetadataCreate) Save

Save creates the ClaudeMetadata in the database.

func (*ClaudeMetadataCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ClaudeMetadataCreate) SetClaudeSession

func (_c *ClaudeMetadataCreate) SetClaudeSession(v *ClaudeSession) *ClaudeMetadataCreate

SetClaudeSession sets the "claude_session" edge to the ClaudeSession entity.

func (*ClaudeMetadataCreate) SetClaudeSessionID

func (_c *ClaudeMetadataCreate) SetClaudeSessionID(id int) *ClaudeMetadataCreate

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID.

func (*ClaudeMetadataCreate) SetKey

SetKey sets the "key" field.

func (*ClaudeMetadataCreate) SetValue

SetValue sets the "value" field.

type ClaudeMetadataCreateBulk

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

ClaudeMetadataCreateBulk is the builder for creating many ClaudeMetadata entities in bulk.

func (*ClaudeMetadataCreateBulk) Exec

Exec executes the query.

func (*ClaudeMetadataCreateBulk) ExecX

func (_c *ClaudeMetadataCreateBulk) ExecX(ctx context.Context)

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

func (*ClaudeMetadataCreateBulk) OnConflict added in v1.12.0

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

client.ClaudeMetadata.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.ClaudeMetadataUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*ClaudeMetadataCreateBulk) OnConflictColumns added in v1.12.0

func (_c *ClaudeMetadataCreateBulk) OnConflictColumns(columns ...string) *ClaudeMetadataUpsertBulk

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

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

func (*ClaudeMetadataCreateBulk) Save

Save creates the ClaudeMetadata entities in the database.

func (*ClaudeMetadataCreateBulk) SaveX

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

type ClaudeMetadataDelete

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

ClaudeMetadataDelete is the builder for deleting a ClaudeMetadata entity.

func (*ClaudeMetadataDelete) Exec

func (_d *ClaudeMetadataDelete) Exec(ctx context.Context) (int, error)

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

func (*ClaudeMetadataDelete) ExecX

func (_d *ClaudeMetadataDelete) ExecX(ctx context.Context) int

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

func (*ClaudeMetadataDelete) Where

Where appends a list predicates to the ClaudeMetadataDelete builder.

type ClaudeMetadataDeleteOne

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

ClaudeMetadataDeleteOne is the builder for deleting a single ClaudeMetadata entity.

func (*ClaudeMetadataDeleteOne) Exec

Exec executes the deletion query.

func (*ClaudeMetadataDeleteOne) ExecX

func (_d *ClaudeMetadataDeleteOne) ExecX(ctx context.Context)

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

func (*ClaudeMetadataDeleteOne) Where

Where appends a list predicates to the ClaudeMetadataDelete builder.

type ClaudeMetadataEdges

type ClaudeMetadataEdges struct {
	// ClaudeSession holds the value of the claude_session edge.
	ClaudeSession *ClaudeSession `json:"claude_session,omitempty"`
	// contains filtered or unexported fields
}

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

func (ClaudeMetadataEdges) ClaudeSessionOrErr

func (e ClaudeMetadataEdges) ClaudeSessionOrErr() (*ClaudeSession, error)

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

type ClaudeMetadataGroupBy

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

ClaudeMetadataGroupBy is the group-by builder for ClaudeMetadata entities.

func (*ClaudeMetadataGroupBy) Aggregate

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

func (*ClaudeMetadataGroupBy) Bool

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

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

func (*ClaudeMetadataGroupBy) BoolX

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

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

func (*ClaudeMetadataGroupBy) Bools

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

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

func (*ClaudeMetadataGroupBy) BoolsX

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

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

func (*ClaudeMetadataGroupBy) Float64

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

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

func (*ClaudeMetadataGroupBy) Float64X

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

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

func (*ClaudeMetadataGroupBy) Float64s

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

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

func (*ClaudeMetadataGroupBy) Float64sX

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

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

func (*ClaudeMetadataGroupBy) Int

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

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

func (*ClaudeMetadataGroupBy) IntX

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

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

func (*ClaudeMetadataGroupBy) Ints

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

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

func (*ClaudeMetadataGroupBy) IntsX

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

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

func (*ClaudeMetadataGroupBy) Scan

func (_g *ClaudeMetadataGroupBy) Scan(ctx context.Context, v any) error

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

func (*ClaudeMetadataGroupBy) ScanX

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

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

func (*ClaudeMetadataGroupBy) String

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

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

func (*ClaudeMetadataGroupBy) StringX

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

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

func (*ClaudeMetadataGroupBy) Strings

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

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

func (*ClaudeMetadataGroupBy) StringsX

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

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

type ClaudeMetadataMutation

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

ClaudeMetadataMutation represents an operation that mutates the ClaudeMetadata nodes in the graph.

func (*ClaudeMetadataMutation) AddField

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

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

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

func (*ClaudeMetadataMutation) AddedField

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

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

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

func (*ClaudeMetadataMutation) AddedIDs

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

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

func (*ClaudeMetadataMutation) ClaudeSessionCleared

func (m *ClaudeMetadataMutation) ClaudeSessionCleared() bool

ClaudeSessionCleared reports if the "claude_session" edge to the ClaudeSession entity was cleared.

func (*ClaudeMetadataMutation) ClaudeSessionID

func (m *ClaudeMetadataMutation) ClaudeSessionID() (id int, exists bool)

ClaudeSessionID returns the "claude_session" edge ID in the mutation.

func (*ClaudeMetadataMutation) ClaudeSessionIDs

func (m *ClaudeMetadataMutation) ClaudeSessionIDs() (ids []int)

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

func (*ClaudeMetadataMutation) ClearClaudeSession

func (m *ClaudeMetadataMutation) ClearClaudeSession()

ClearClaudeSession clears the "claude_session" edge to the ClaudeSession entity.

func (*ClaudeMetadataMutation) ClearEdge

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

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

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

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

func (*ClaudeMetadataMutation) ClearedFields

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

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

func (ClaudeMetadataMutation) Client

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

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

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

func (*ClaudeMetadataMutation) Field

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

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

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

func (*ClaudeMetadataMutation) Fields

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

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

func (m *ClaudeMetadataMutation) 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 (*ClaudeMetadataMutation) Key

func (m *ClaudeMetadataMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*ClaudeMetadataMutation) OldField

func (m *ClaudeMetadataMutation) 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 (*ClaudeMetadataMutation) OldKey

func (m *ClaudeMetadataMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the ClaudeMetadata entity. If the ClaudeMetadata 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 (*ClaudeMetadataMutation) OldValue

func (m *ClaudeMetadataMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the ClaudeMetadata entity. If the ClaudeMetadata 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 (*ClaudeMetadataMutation) Op

func (m *ClaudeMetadataMutation) Op() Op

Op returns the operation name.

func (*ClaudeMetadataMutation) RemovedEdges

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

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

func (*ClaudeMetadataMutation) RemovedIDs

func (m *ClaudeMetadataMutation) 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 (*ClaudeMetadataMutation) ResetClaudeSession

func (m *ClaudeMetadataMutation) ResetClaudeSession()

ResetClaudeSession resets all changes to the "claude_session" edge.

func (*ClaudeMetadataMutation) ResetEdge

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

func (m *ClaudeMetadataMutation) 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 (*ClaudeMetadataMutation) ResetKey

func (m *ClaudeMetadataMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*ClaudeMetadataMutation) ResetValue

func (m *ClaudeMetadataMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*ClaudeMetadataMutation) SetClaudeSessionID

func (m *ClaudeMetadataMutation) SetClaudeSessionID(id int)

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by id.

func (*ClaudeMetadataMutation) SetField

func (m *ClaudeMetadataMutation) 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 (*ClaudeMetadataMutation) SetKey

func (m *ClaudeMetadataMutation) SetKey(s string)

SetKey sets the "key" field.

func (*ClaudeMetadataMutation) SetOp

func (m *ClaudeMetadataMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ClaudeMetadataMutation) SetValue

func (m *ClaudeMetadataMutation) SetValue(s string)

SetValue sets the "value" field.

func (ClaudeMetadataMutation) Tx

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

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

func (*ClaudeMetadataMutation) Type

func (m *ClaudeMetadataMutation) Type() string

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

func (*ClaudeMetadataMutation) Value

func (m *ClaudeMetadataMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*ClaudeMetadataMutation) Where

Where appends a list predicates to the ClaudeMetadataMutation builder.

func (*ClaudeMetadataMutation) WhereP

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

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

type ClaudeMetadataQuery

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

ClaudeMetadataQuery is the builder for querying ClaudeMetadata entities.

func (*ClaudeMetadataQuery) Aggregate

Aggregate returns a ClaudeMetadataSelect configured with the given aggregations.

func (*ClaudeMetadataQuery) All

All executes the query and returns a list of ClaudeMetadataSlice.

func (*ClaudeMetadataQuery) AllX

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

func (*ClaudeMetadataQuery) Clone

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

func (*ClaudeMetadataQuery) Count

func (_q *ClaudeMetadataQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ClaudeMetadataQuery) CountX

func (_q *ClaudeMetadataQuery) CountX(ctx context.Context) int

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

func (*ClaudeMetadataQuery) Exist

func (_q *ClaudeMetadataQuery) Exist(ctx context.Context) (bool, error)

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

func (*ClaudeMetadataQuery) ExistX

func (_q *ClaudeMetadataQuery) ExistX(ctx context.Context) bool

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

func (*ClaudeMetadataQuery) First

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

func (*ClaudeMetadataQuery) FirstID

func (_q *ClaudeMetadataQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ClaudeMetadataQuery) FirstIDX

func (_q *ClaudeMetadataQuery) FirstIDX(ctx context.Context) int

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

func (*ClaudeMetadataQuery) FirstX

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

func (*ClaudeMetadataQuery) GroupBy

func (_q *ClaudeMetadataQuery) GroupBy(field string, fields ...string) *ClaudeMetadataGroupBy

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

client.ClaudeMetadata.Query().
	GroupBy(claudemetadata.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ClaudeMetadataQuery) IDs

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

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

func (*ClaudeMetadataQuery) IDsX

func (_q *ClaudeMetadataQuery) IDsX(ctx context.Context) []int

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

func (*ClaudeMetadataQuery) Limit

func (_q *ClaudeMetadataQuery) Limit(limit int) *ClaudeMetadataQuery

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

func (*ClaudeMetadataQuery) Offset

func (_q *ClaudeMetadataQuery) Offset(offset int) *ClaudeMetadataQuery

Offset to start from.

func (*ClaudeMetadataQuery) Only

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

func (*ClaudeMetadataQuery) OnlyID

func (_q *ClaudeMetadataQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ClaudeMetadataQuery) OnlyIDX

func (_q *ClaudeMetadataQuery) OnlyIDX(ctx context.Context) int

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

func (*ClaudeMetadataQuery) OnlyX

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

func (*ClaudeMetadataQuery) Order

Order specifies how the records should be ordered.

func (*ClaudeMetadataQuery) QueryClaudeSession

func (_q *ClaudeMetadataQuery) QueryClaudeSession() *ClaudeSessionQuery

QueryClaudeSession chains the current query on the "claude_session" edge.

func (*ClaudeMetadataQuery) Select

func (_q *ClaudeMetadataQuery) Select(fields ...string) *ClaudeMetadataSelect

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

client.ClaudeMetadata.Query().
	Select(claudemetadata.FieldKey).
	Scan(ctx, &v)

func (*ClaudeMetadataQuery) Unique

func (_q *ClaudeMetadataQuery) Unique(unique bool) *ClaudeMetadataQuery

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

Where adds a new predicate for the ClaudeMetadataQuery builder.

func (*ClaudeMetadataQuery) WithClaudeSession

func (_q *ClaudeMetadataQuery) WithClaudeSession(opts ...func(*ClaudeSessionQuery)) *ClaudeMetadataQuery

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

type ClaudeMetadataSelect

type ClaudeMetadataSelect struct {
	*ClaudeMetadataQuery
	// contains filtered or unexported fields
}

ClaudeMetadataSelect is the builder for selecting fields of ClaudeMetadata entities.

func (*ClaudeMetadataSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ClaudeMetadataSelect) Bool

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

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

func (*ClaudeMetadataSelect) BoolX

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

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

func (*ClaudeMetadataSelect) Bools

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

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

func (*ClaudeMetadataSelect) BoolsX

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

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

func (*ClaudeMetadataSelect) Float64

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

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

func (*ClaudeMetadataSelect) Float64X

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

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

func (*ClaudeMetadataSelect) Float64s

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

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

func (*ClaudeMetadataSelect) Float64sX

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

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

func (*ClaudeMetadataSelect) Int

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

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

func (*ClaudeMetadataSelect) IntX

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

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

func (*ClaudeMetadataSelect) Ints

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

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

func (*ClaudeMetadataSelect) IntsX

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

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

func (*ClaudeMetadataSelect) Scan

func (_s *ClaudeMetadataSelect) Scan(ctx context.Context, v any) error

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

func (*ClaudeMetadataSelect) ScanX

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

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

func (*ClaudeMetadataSelect) String

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

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

func (*ClaudeMetadataSelect) StringX

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

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

func (*ClaudeMetadataSelect) Strings

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

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

func (*ClaudeMetadataSelect) StringsX

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

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

type ClaudeMetadataSlice

type ClaudeMetadataSlice []*ClaudeMetadata

ClaudeMetadataSlice is a parsable slice of ClaudeMetadata.

type ClaudeMetadataUpdate

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

ClaudeMetadataUpdate is the builder for updating ClaudeMetadata entities.

func (*ClaudeMetadataUpdate) ClearClaudeSession

func (_u *ClaudeMetadataUpdate) ClearClaudeSession() *ClaudeMetadataUpdate

ClearClaudeSession clears the "claude_session" edge to the ClaudeSession entity.

func (*ClaudeMetadataUpdate) Exec

func (_u *ClaudeMetadataUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClaudeMetadataUpdate) ExecX

func (_u *ClaudeMetadataUpdate) ExecX(ctx context.Context)

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

func (*ClaudeMetadataUpdate) Mutation

Mutation returns the ClaudeMetadataMutation object of the builder.

func (*ClaudeMetadataUpdate) Save

func (_u *ClaudeMetadataUpdate) Save(ctx context.Context) (int, error)

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

func (*ClaudeMetadataUpdate) SaveX

func (_u *ClaudeMetadataUpdate) SaveX(ctx context.Context) int

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

func (*ClaudeMetadataUpdate) SetClaudeSession

func (_u *ClaudeMetadataUpdate) SetClaudeSession(v *ClaudeSession) *ClaudeMetadataUpdate

SetClaudeSession sets the "claude_session" edge to the ClaudeSession entity.

func (*ClaudeMetadataUpdate) SetClaudeSessionID

func (_u *ClaudeMetadataUpdate) SetClaudeSessionID(id int) *ClaudeMetadataUpdate

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID.

func (*ClaudeMetadataUpdate) SetKey

SetKey sets the "key" field.

func (*ClaudeMetadataUpdate) SetNillableKey

func (_u *ClaudeMetadataUpdate) SetNillableKey(v *string) *ClaudeMetadataUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*ClaudeMetadataUpdate) SetNillableValue

func (_u *ClaudeMetadataUpdate) SetNillableValue(v *string) *ClaudeMetadataUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*ClaudeMetadataUpdate) SetValue

SetValue sets the "value" field.

func (*ClaudeMetadataUpdate) Where

Where appends a list predicates to the ClaudeMetadataUpdate builder.

type ClaudeMetadataUpdateOne

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

ClaudeMetadataUpdateOne is the builder for updating a single ClaudeMetadata entity.

func (*ClaudeMetadataUpdateOne) ClearClaudeSession

func (_u *ClaudeMetadataUpdateOne) ClearClaudeSession() *ClaudeMetadataUpdateOne

ClearClaudeSession clears the "claude_session" edge to the ClaudeSession entity.

func (*ClaudeMetadataUpdateOne) Exec

Exec executes the query on the entity.

func (*ClaudeMetadataUpdateOne) ExecX

func (_u *ClaudeMetadataUpdateOne) ExecX(ctx context.Context)

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

func (*ClaudeMetadataUpdateOne) Mutation

Mutation returns the ClaudeMetadataMutation object of the builder.

func (*ClaudeMetadataUpdateOne) Save

Save executes the query and returns the updated ClaudeMetadata entity.

func (*ClaudeMetadataUpdateOne) SaveX

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

func (*ClaudeMetadataUpdateOne) Select

func (_u *ClaudeMetadataUpdateOne) Select(field string, fields ...string) *ClaudeMetadataUpdateOne

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

func (*ClaudeMetadataUpdateOne) SetClaudeSession

SetClaudeSession sets the "claude_session" edge to the ClaudeSession entity.

func (*ClaudeMetadataUpdateOne) SetClaudeSessionID

func (_u *ClaudeMetadataUpdateOne) SetClaudeSessionID(id int) *ClaudeMetadataUpdateOne

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID.

func (*ClaudeMetadataUpdateOne) SetKey

SetKey sets the "key" field.

func (*ClaudeMetadataUpdateOne) SetNillableKey

func (_u *ClaudeMetadataUpdateOne) SetNillableKey(v *string) *ClaudeMetadataUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*ClaudeMetadataUpdateOne) SetNillableValue

func (_u *ClaudeMetadataUpdateOne) SetNillableValue(v *string) *ClaudeMetadataUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*ClaudeMetadataUpdateOne) SetValue

SetValue sets the "value" field.

func (*ClaudeMetadataUpdateOne) Where

Where appends a list predicates to the ClaudeMetadataUpdate builder.

type ClaudeMetadataUpsert added in v1.12.0

type ClaudeMetadataUpsert struct {
	*sql.UpdateSet
}

ClaudeMetadataUpsert is the "OnConflict" setter.

func (*ClaudeMetadataUpsert) SetKey added in v1.12.0

SetKey sets the "key" field.

func (*ClaudeMetadataUpsert) SetValue added in v1.12.0

SetValue sets the "value" field.

func (*ClaudeMetadataUpsert) UpdateKey added in v1.12.0

UpdateKey sets the "key" field to the value that was provided on create.

func (*ClaudeMetadataUpsert) UpdateValue added in v1.12.0

func (u *ClaudeMetadataUpsert) UpdateValue() *ClaudeMetadataUpsert

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

type ClaudeMetadataUpsertBulk added in v1.12.0

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

ClaudeMetadataUpsertBulk is the builder for "upsert"-ing a bulk of ClaudeMetadata nodes.

func (*ClaudeMetadataUpsertBulk) DoNothing added in v1.12.0

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

func (*ClaudeMetadataUpsertBulk) Exec added in v1.12.0

Exec executes the query.

func (*ClaudeMetadataUpsertBulk) ExecX added in v1.12.0

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

func (*ClaudeMetadataUpsertBulk) Ignore added in v1.12.0

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

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

func (*ClaudeMetadataUpsertBulk) SetKey added in v1.12.0

SetKey sets the "key" field.

func (*ClaudeMetadataUpsertBulk) SetValue added in v1.12.0

SetValue sets the "value" field.

func (*ClaudeMetadataUpsertBulk) Update added in v1.12.0

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

func (*ClaudeMetadataUpsertBulk) UpdateKey added in v1.12.0

UpdateKey sets the "key" field to the value that was provided on create.

func (*ClaudeMetadataUpsertBulk) UpdateNewValues added in v1.12.0

func (u *ClaudeMetadataUpsertBulk) UpdateNewValues() *ClaudeMetadataUpsertBulk

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

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

func (*ClaudeMetadataUpsertBulk) UpdateValue added in v1.12.0

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

type ClaudeMetadataUpsertOne added in v1.12.0

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

ClaudeMetadataUpsertOne is the builder for "upsert"-ing

one ClaudeMetadata node.

func (*ClaudeMetadataUpsertOne) DoNothing added in v1.12.0

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

func (*ClaudeMetadataUpsertOne) Exec added in v1.12.0

Exec executes the query.

func (*ClaudeMetadataUpsertOne) ExecX added in v1.12.0

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

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

func (*ClaudeMetadataUpsertOne) ID added in v1.12.0

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

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

func (*ClaudeMetadataUpsertOne) IDX added in v1.12.0

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

func (*ClaudeMetadataUpsertOne) Ignore added in v1.12.0

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

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

func (*ClaudeMetadataUpsertOne) SetKey added in v1.12.0

SetKey sets the "key" field.

func (*ClaudeMetadataUpsertOne) SetValue added in v1.12.0

SetValue sets the "value" field.

func (*ClaudeMetadataUpsertOne) Update added in v1.12.0

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

func (*ClaudeMetadataUpsertOne) UpdateKey added in v1.12.0

UpdateKey sets the "key" field to the value that was provided on create.

func (*ClaudeMetadataUpsertOne) UpdateNewValues added in v1.12.0

func (u *ClaudeMetadataUpsertOne) UpdateNewValues() *ClaudeMetadataUpsertOne

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

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

func (*ClaudeMetadataUpsertOne) UpdateValue added in v1.12.0

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

type ClaudeSession

type ClaudeSession struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// ClaudeSessionID holds the value of the "claude_session_id" field.
	ClaudeSessionID string `json:"claude_session_id,omitempty"`
	// ConversationID holds the value of the "conversation_id" field.
	ConversationID string `json:"conversation_id,omitempty"`
	// ProjectName holds the value of the "project_name" field.
	ProjectName string `json:"project_name,omitempty"`
	// LastAttached holds the value of the "last_attached" field.
	LastAttached *time.Time `json:"last_attached,omitempty"`
	// AutoReattach holds the value of the "auto_reattach" field.
	AutoReattach bool `json:"auto_reattach,omitempty"`
	// PreferredSessionName holds the value of the "preferred_session_name" field.
	PreferredSessionName string `json:"preferred_session_name,omitempty"`
	// CreateNewOnMissing holds the value of the "create_new_on_missing" field.
	CreateNewOnMissing bool `json:"create_new_on_missing,omitempty"`
	// ShowSessionSelector holds the value of the "show_session_selector" field.
	ShowSessionSelector bool `json:"show_session_selector,omitempty"`
	// SessionTimeoutMinutes holds the value of the "session_timeout_minutes" field.
	SessionTimeoutMinutes int `json:"session_timeout_minutes,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ClaudeSessionQuery when eager-loading is set.
	Edges ClaudeSessionEdges `json:"edges"`
	// contains filtered or unexported fields
}

ClaudeSession is the model entity for the ClaudeSession schema.

func (*ClaudeSession) QueryMetadata

func (_m *ClaudeSession) QueryMetadata() *ClaudeMetadataQuery

QueryMetadata queries the "metadata" edge of the ClaudeSession entity.

func (*ClaudeSession) QuerySession

func (_m *ClaudeSession) QuerySession() *SessionQuery

QuerySession queries the "session" edge of the ClaudeSession entity.

func (*ClaudeSession) String

func (_m *ClaudeSession) String() string

String implements the fmt.Stringer.

func (*ClaudeSession) Unwrap

func (_m *ClaudeSession) Unwrap() *ClaudeSession

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

func (_m *ClaudeSession) Update() *ClaudeSessionUpdateOne

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

func (*ClaudeSession) Value

func (_m *ClaudeSession) Value(name string) (ent.Value, error)

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

type ClaudeSessionClient

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

ClaudeSessionClient is a client for the ClaudeSession schema.

func NewClaudeSessionClient

func NewClaudeSessionClient(c config) *ClaudeSessionClient

NewClaudeSessionClient returns a client for the ClaudeSession from the given config.

func (*ClaudeSessionClient) Create

Create returns a builder for creating a ClaudeSession entity.

func (*ClaudeSessionClient) CreateBulk

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

func (*ClaudeSessionClient) Delete

Delete returns a delete builder for ClaudeSession.

func (*ClaudeSessionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ClaudeSessionClient) DeleteOneID

func (c *ClaudeSessionClient) DeleteOneID(id int) *ClaudeSessionDeleteOne

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

func (*ClaudeSessionClient) Get

Get returns a ClaudeSession entity by its id.

func (*ClaudeSessionClient) GetX

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

func (*ClaudeSessionClient) Hooks

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

Hooks returns the client hooks.

func (*ClaudeSessionClient) Intercept

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

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

func (*ClaudeSessionClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ClaudeSessionClient) MapCreateBulk

func (c *ClaudeSessionClient) MapCreateBulk(slice any, setFunc func(*ClaudeSessionCreate, int)) *ClaudeSessionCreateBulk

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

Query returns a query builder for ClaudeSession.

func (*ClaudeSessionClient) QueryMetadata

func (c *ClaudeSessionClient) QueryMetadata(_m *ClaudeSession) *ClaudeMetadataQuery

QueryMetadata queries the metadata edge of a ClaudeSession.

func (*ClaudeSessionClient) QuerySession

func (c *ClaudeSessionClient) QuerySession(_m *ClaudeSession) *SessionQuery

QuerySession queries the session edge of a ClaudeSession.

func (*ClaudeSessionClient) Update

Update returns an update builder for ClaudeSession.

func (*ClaudeSessionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ClaudeSessionClient) UpdateOneID

func (c *ClaudeSessionClient) UpdateOneID(id int) *ClaudeSessionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ClaudeSessionClient) Use

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

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

type ClaudeSessionCreate

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

ClaudeSessionCreate is the builder for creating a ClaudeSession entity.

func (*ClaudeSessionCreate) AddMetadata

func (_c *ClaudeSessionCreate) AddMetadata(v ...*ClaudeMetadata) *ClaudeSessionCreate

AddMetadata adds the "metadata" edges to the ClaudeMetadata entity.

func (*ClaudeSessionCreate) AddMetadatumIDs

func (_c *ClaudeSessionCreate) AddMetadatumIDs(ids ...int) *ClaudeSessionCreate

AddMetadatumIDs adds the "metadata" edge to the ClaudeMetadata entity by IDs.

func (*ClaudeSessionCreate) Exec

func (_c *ClaudeSessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClaudeSessionCreate) ExecX

func (_c *ClaudeSessionCreate) ExecX(ctx context.Context)

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

func (*ClaudeSessionCreate) Mutation

Mutation returns the ClaudeSessionMutation object of the builder.

func (*ClaudeSessionCreate) OnConflict added in v1.12.0

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

client.ClaudeSession.Create().
	SetClaudeSessionID(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.ClaudeSessionUpsert) {
		SetClaudeSessionID(v+v).
	}).
	Exec(ctx)

func (*ClaudeSessionCreate) OnConflictColumns added in v1.12.0

func (_c *ClaudeSessionCreate) OnConflictColumns(columns ...string) *ClaudeSessionUpsertOne

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

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

func (*ClaudeSessionCreate) Save

Save creates the ClaudeSession in the database.

func (*ClaudeSessionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ClaudeSessionCreate) SetAutoReattach

func (_c *ClaudeSessionCreate) SetAutoReattach(v bool) *ClaudeSessionCreate

SetAutoReattach sets the "auto_reattach" field.

func (*ClaudeSessionCreate) SetClaudeSessionID

func (_c *ClaudeSessionCreate) SetClaudeSessionID(v string) *ClaudeSessionCreate

SetClaudeSessionID sets the "claude_session_id" field.

func (*ClaudeSessionCreate) SetConversationID

func (_c *ClaudeSessionCreate) SetConversationID(v string) *ClaudeSessionCreate

SetConversationID sets the "conversation_id" field.

func (*ClaudeSessionCreate) SetCreateNewOnMissing

func (_c *ClaudeSessionCreate) SetCreateNewOnMissing(v bool) *ClaudeSessionCreate

SetCreateNewOnMissing sets the "create_new_on_missing" field.

func (*ClaudeSessionCreate) SetLastAttached

func (_c *ClaudeSessionCreate) SetLastAttached(v time.Time) *ClaudeSessionCreate

SetLastAttached sets the "last_attached" field.

func (*ClaudeSessionCreate) SetNillableAutoReattach

func (_c *ClaudeSessionCreate) SetNillableAutoReattach(v *bool) *ClaudeSessionCreate

SetNillableAutoReattach sets the "auto_reattach" field if the given value is not nil.

func (*ClaudeSessionCreate) SetNillableConversationID

func (_c *ClaudeSessionCreate) SetNillableConversationID(v *string) *ClaudeSessionCreate

SetNillableConversationID sets the "conversation_id" field if the given value is not nil.

func (*ClaudeSessionCreate) SetNillableCreateNewOnMissing

func (_c *ClaudeSessionCreate) SetNillableCreateNewOnMissing(v *bool) *ClaudeSessionCreate

SetNillableCreateNewOnMissing sets the "create_new_on_missing" field if the given value is not nil.

func (*ClaudeSessionCreate) SetNillableLastAttached

func (_c *ClaudeSessionCreate) SetNillableLastAttached(v *time.Time) *ClaudeSessionCreate

SetNillableLastAttached sets the "last_attached" field if the given value is not nil.

func (*ClaudeSessionCreate) SetNillablePreferredSessionName

func (_c *ClaudeSessionCreate) SetNillablePreferredSessionName(v *string) *ClaudeSessionCreate

SetNillablePreferredSessionName sets the "preferred_session_name" field if the given value is not nil.

func (*ClaudeSessionCreate) SetNillableProjectName

func (_c *ClaudeSessionCreate) SetNillableProjectName(v *string) *ClaudeSessionCreate

SetNillableProjectName sets the "project_name" field if the given value is not nil.

func (*ClaudeSessionCreate) SetNillableSessionTimeoutMinutes

func (_c *ClaudeSessionCreate) SetNillableSessionTimeoutMinutes(v *int) *ClaudeSessionCreate

SetNillableSessionTimeoutMinutes sets the "session_timeout_minutes" field if the given value is not nil.

func (*ClaudeSessionCreate) SetNillableShowSessionSelector

func (_c *ClaudeSessionCreate) SetNillableShowSessionSelector(v *bool) *ClaudeSessionCreate

SetNillableShowSessionSelector sets the "show_session_selector" field if the given value is not nil.

func (*ClaudeSessionCreate) SetPreferredSessionName

func (_c *ClaudeSessionCreate) SetPreferredSessionName(v string) *ClaudeSessionCreate

SetPreferredSessionName sets the "preferred_session_name" field.

func (*ClaudeSessionCreate) SetProjectName

func (_c *ClaudeSessionCreate) SetProjectName(v string) *ClaudeSessionCreate

SetProjectName sets the "project_name" field.

func (*ClaudeSessionCreate) SetSession

func (_c *ClaudeSessionCreate) SetSession(v *Session) *ClaudeSessionCreate

SetSession sets the "session" edge to the Session entity.

func (*ClaudeSessionCreate) SetSessionID

func (_c *ClaudeSessionCreate) SetSessionID(id int) *ClaudeSessionCreate

SetSessionID sets the "session" edge to the Session entity by ID.

func (*ClaudeSessionCreate) SetSessionTimeoutMinutes

func (_c *ClaudeSessionCreate) SetSessionTimeoutMinutes(v int) *ClaudeSessionCreate

SetSessionTimeoutMinutes sets the "session_timeout_minutes" field.

func (*ClaudeSessionCreate) SetShowSessionSelector

func (_c *ClaudeSessionCreate) SetShowSessionSelector(v bool) *ClaudeSessionCreate

SetShowSessionSelector sets the "show_session_selector" field.

type ClaudeSessionCreateBulk

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

ClaudeSessionCreateBulk is the builder for creating many ClaudeSession entities in bulk.

func (*ClaudeSessionCreateBulk) Exec

Exec executes the query.

func (*ClaudeSessionCreateBulk) ExecX

func (_c *ClaudeSessionCreateBulk) ExecX(ctx context.Context)

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

func (*ClaudeSessionCreateBulk) OnConflict added in v1.12.0

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

client.ClaudeSession.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.ClaudeSessionUpsert) {
		SetClaudeSessionID(v+v).
	}).
	Exec(ctx)

func (*ClaudeSessionCreateBulk) OnConflictColumns added in v1.12.0

func (_c *ClaudeSessionCreateBulk) OnConflictColumns(columns ...string) *ClaudeSessionUpsertBulk

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

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

func (*ClaudeSessionCreateBulk) Save

Save creates the ClaudeSession entities in the database.

func (*ClaudeSessionCreateBulk) SaveX

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

type ClaudeSessionDelete

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

ClaudeSessionDelete is the builder for deleting a ClaudeSession entity.

func (*ClaudeSessionDelete) Exec

func (_d *ClaudeSessionDelete) Exec(ctx context.Context) (int, error)

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

func (*ClaudeSessionDelete) ExecX

func (_d *ClaudeSessionDelete) ExecX(ctx context.Context) int

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

func (*ClaudeSessionDelete) Where

Where appends a list predicates to the ClaudeSessionDelete builder.

type ClaudeSessionDeleteOne

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

ClaudeSessionDeleteOne is the builder for deleting a single ClaudeSession entity.

func (*ClaudeSessionDeleteOne) Exec

Exec executes the deletion query.

func (*ClaudeSessionDeleteOne) ExecX

func (_d *ClaudeSessionDeleteOne) ExecX(ctx context.Context)

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

func (*ClaudeSessionDeleteOne) Where

Where appends a list predicates to the ClaudeSessionDelete builder.

type ClaudeSessionEdges

type ClaudeSessionEdges struct {
	// Session holds the value of the session edge.
	Session *Session `json:"session,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata []*ClaudeMetadata `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

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

func (ClaudeSessionEdges) MetadataOrErr

func (e ClaudeSessionEdges) MetadataOrErr() ([]*ClaudeMetadata, error)

MetadataOrErr returns the Metadata value or an error if the edge was not loaded in eager-loading.

func (ClaudeSessionEdges) SessionOrErr

func (e ClaudeSessionEdges) SessionOrErr() (*Session, error)

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

type ClaudeSessionGroupBy

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

ClaudeSessionGroupBy is the group-by builder for ClaudeSession entities.

func (*ClaudeSessionGroupBy) Aggregate

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

func (*ClaudeSessionGroupBy) Bool

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

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

func (*ClaudeSessionGroupBy) BoolX

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

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

func (*ClaudeSessionGroupBy) Bools

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

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

func (*ClaudeSessionGroupBy) BoolsX

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

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

func (*ClaudeSessionGroupBy) Float64

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

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

func (*ClaudeSessionGroupBy) Float64X

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

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

func (*ClaudeSessionGroupBy) Float64s

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

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

func (*ClaudeSessionGroupBy) Float64sX

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

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

func (*ClaudeSessionGroupBy) Int

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

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

func (*ClaudeSessionGroupBy) IntX

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

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

func (*ClaudeSessionGroupBy) Ints

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

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

func (*ClaudeSessionGroupBy) IntsX

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

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

func (*ClaudeSessionGroupBy) Scan

func (_g *ClaudeSessionGroupBy) Scan(ctx context.Context, v any) error

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

func (*ClaudeSessionGroupBy) ScanX

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

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

func (*ClaudeSessionGroupBy) String

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

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

func (*ClaudeSessionGroupBy) StringX

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

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

func (*ClaudeSessionGroupBy) Strings

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

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

func (*ClaudeSessionGroupBy) StringsX

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

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

type ClaudeSessionMutation

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

ClaudeSessionMutation represents an operation that mutates the ClaudeSession nodes in the graph.

func (*ClaudeSessionMutation) AddField

func (m *ClaudeSessionMutation) 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 (*ClaudeSessionMutation) AddMetadatumIDs

func (m *ClaudeSessionMutation) AddMetadatumIDs(ids ...int)

AddMetadatumIDs adds the "metadata" edge to the ClaudeMetadata entity by ids.

func (*ClaudeSessionMutation) AddSessionTimeoutMinutes

func (m *ClaudeSessionMutation) AddSessionTimeoutMinutes(i int)

AddSessionTimeoutMinutes adds i to the "session_timeout_minutes" field.

func (*ClaudeSessionMutation) AddedEdges

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

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

func (*ClaudeSessionMutation) AddedField

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

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

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

func (*ClaudeSessionMutation) AddedIDs

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

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

func (*ClaudeSessionMutation) AddedSessionTimeoutMinutes

func (m *ClaudeSessionMutation) AddedSessionTimeoutMinutes() (r int, exists bool)

AddedSessionTimeoutMinutes returns the value that was added to the "session_timeout_minutes" field in this mutation.

func (*ClaudeSessionMutation) AutoReattach

func (m *ClaudeSessionMutation) AutoReattach() (r bool, exists bool)

AutoReattach returns the value of the "auto_reattach" field in the mutation.

func (*ClaudeSessionMutation) ClaudeSessionID

func (m *ClaudeSessionMutation) ClaudeSessionID() (r string, exists bool)

ClaudeSessionID returns the value of the "claude_session_id" field in the mutation.

func (*ClaudeSessionMutation) ClearConversationID

func (m *ClaudeSessionMutation) ClearConversationID()

ClearConversationID clears the value of the "conversation_id" field.

func (*ClaudeSessionMutation) ClearEdge

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

func (m *ClaudeSessionMutation) 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 (*ClaudeSessionMutation) ClearLastAttached

func (m *ClaudeSessionMutation) ClearLastAttached()

ClearLastAttached clears the value of the "last_attached" field.

func (*ClaudeSessionMutation) ClearMetadata

func (m *ClaudeSessionMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the ClaudeMetadata entity.

func (*ClaudeSessionMutation) ClearPreferredSessionName

func (m *ClaudeSessionMutation) ClearPreferredSessionName()

ClearPreferredSessionName clears the value of the "preferred_session_name" field.

func (*ClaudeSessionMutation) ClearProjectName

func (m *ClaudeSessionMutation) ClearProjectName()

ClearProjectName clears the value of the "project_name" field.

func (*ClaudeSessionMutation) ClearSession

func (m *ClaudeSessionMutation) ClearSession()

ClearSession clears the "session" edge to the Session entity.

func (*ClaudeSessionMutation) ClearedEdges

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

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

func (*ClaudeSessionMutation) ClearedFields

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

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

func (ClaudeSessionMutation) Client

func (m ClaudeSessionMutation) 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 (*ClaudeSessionMutation) ConversationID

func (m *ClaudeSessionMutation) ConversationID() (r string, exists bool)

ConversationID returns the value of the "conversation_id" field in the mutation.

func (*ClaudeSessionMutation) ConversationIDCleared

func (m *ClaudeSessionMutation) ConversationIDCleared() bool

ConversationIDCleared returns if the "conversation_id" field was cleared in this mutation.

func (*ClaudeSessionMutation) CreateNewOnMissing

func (m *ClaudeSessionMutation) CreateNewOnMissing() (r bool, exists bool)

CreateNewOnMissing returns the value of the "create_new_on_missing" field in the mutation.

func (*ClaudeSessionMutation) EdgeCleared

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

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

func (*ClaudeSessionMutation) Field

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

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

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

func (*ClaudeSessionMutation) Fields

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

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

func (m *ClaudeSessionMutation) 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 (*ClaudeSessionMutation) LastAttached

func (m *ClaudeSessionMutation) LastAttached() (r time.Time, exists bool)

LastAttached returns the value of the "last_attached" field in the mutation.

func (*ClaudeSessionMutation) LastAttachedCleared

func (m *ClaudeSessionMutation) LastAttachedCleared() bool

LastAttachedCleared returns if the "last_attached" field was cleared in this mutation.

func (*ClaudeSessionMutation) MetadataCleared

func (m *ClaudeSessionMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the ClaudeMetadata entity was cleared.

func (*ClaudeSessionMutation) MetadataIDs

func (m *ClaudeSessionMutation) MetadataIDs() (ids []int)

MetadataIDs returns the "metadata" edge IDs in the mutation.

func (*ClaudeSessionMutation) OldAutoReattach

func (m *ClaudeSessionMutation) OldAutoReattach(ctx context.Context) (v bool, err error)

OldAutoReattach returns the old "auto_reattach" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldClaudeSessionID

func (m *ClaudeSessionMutation) OldClaudeSessionID(ctx context.Context) (v string, err error)

OldClaudeSessionID returns the old "claude_session_id" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldConversationID

func (m *ClaudeSessionMutation) OldConversationID(ctx context.Context) (v string, err error)

OldConversationID returns the old "conversation_id" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldCreateNewOnMissing

func (m *ClaudeSessionMutation) OldCreateNewOnMissing(ctx context.Context) (v bool, err error)

OldCreateNewOnMissing returns the old "create_new_on_missing" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldField

func (m *ClaudeSessionMutation) 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 (*ClaudeSessionMutation) OldLastAttached

func (m *ClaudeSessionMutation) OldLastAttached(ctx context.Context) (v *time.Time, err error)

OldLastAttached returns the old "last_attached" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldPreferredSessionName

func (m *ClaudeSessionMutation) OldPreferredSessionName(ctx context.Context) (v string, err error)

OldPreferredSessionName returns the old "preferred_session_name" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldProjectName

func (m *ClaudeSessionMutation) OldProjectName(ctx context.Context) (v string, err error)

OldProjectName returns the old "project_name" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldSessionTimeoutMinutes

func (m *ClaudeSessionMutation) OldSessionTimeoutMinutes(ctx context.Context) (v int, err error)

OldSessionTimeoutMinutes returns the old "session_timeout_minutes" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) OldShowSessionSelector

func (m *ClaudeSessionMutation) OldShowSessionSelector(ctx context.Context) (v bool, err error)

OldShowSessionSelector returns the old "show_session_selector" field's value of the ClaudeSession entity. If the ClaudeSession 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 (*ClaudeSessionMutation) Op

func (m *ClaudeSessionMutation) Op() Op

Op returns the operation name.

func (*ClaudeSessionMutation) PreferredSessionName

func (m *ClaudeSessionMutation) PreferredSessionName() (r string, exists bool)

PreferredSessionName returns the value of the "preferred_session_name" field in the mutation.

func (*ClaudeSessionMutation) PreferredSessionNameCleared

func (m *ClaudeSessionMutation) PreferredSessionNameCleared() bool

PreferredSessionNameCleared returns if the "preferred_session_name" field was cleared in this mutation.

func (*ClaudeSessionMutation) ProjectName

func (m *ClaudeSessionMutation) ProjectName() (r string, exists bool)

ProjectName returns the value of the "project_name" field in the mutation.

func (*ClaudeSessionMutation) ProjectNameCleared

func (m *ClaudeSessionMutation) ProjectNameCleared() bool

ProjectNameCleared returns if the "project_name" field was cleared in this mutation.

func (*ClaudeSessionMutation) RemoveMetadatumIDs

func (m *ClaudeSessionMutation) RemoveMetadatumIDs(ids ...int)

RemoveMetadatumIDs removes the "metadata" edge to the ClaudeMetadata entity by IDs.

func (*ClaudeSessionMutation) RemovedEdges

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

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

func (*ClaudeSessionMutation) RemovedIDs

func (m *ClaudeSessionMutation) 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 (*ClaudeSessionMutation) RemovedMetadataIDs

func (m *ClaudeSessionMutation) RemovedMetadataIDs() (ids []int)

RemovedMetadata returns the removed IDs of the "metadata" edge to the ClaudeMetadata entity.

func (*ClaudeSessionMutation) ResetAutoReattach

func (m *ClaudeSessionMutation) ResetAutoReattach()

ResetAutoReattach resets all changes to the "auto_reattach" field.

func (*ClaudeSessionMutation) ResetClaudeSessionID

func (m *ClaudeSessionMutation) ResetClaudeSessionID()

ResetClaudeSessionID resets all changes to the "claude_session_id" field.

func (*ClaudeSessionMutation) ResetConversationID

func (m *ClaudeSessionMutation) ResetConversationID()

ResetConversationID resets all changes to the "conversation_id" field.

func (*ClaudeSessionMutation) ResetCreateNewOnMissing

func (m *ClaudeSessionMutation) ResetCreateNewOnMissing()

ResetCreateNewOnMissing resets all changes to the "create_new_on_missing" field.

func (*ClaudeSessionMutation) ResetEdge

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

func (m *ClaudeSessionMutation) 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 (*ClaudeSessionMutation) ResetLastAttached

func (m *ClaudeSessionMutation) ResetLastAttached()

ResetLastAttached resets all changes to the "last_attached" field.

func (*ClaudeSessionMutation) ResetMetadata

func (m *ClaudeSessionMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*ClaudeSessionMutation) ResetPreferredSessionName

func (m *ClaudeSessionMutation) ResetPreferredSessionName()

ResetPreferredSessionName resets all changes to the "preferred_session_name" field.

func (*ClaudeSessionMutation) ResetProjectName

func (m *ClaudeSessionMutation) ResetProjectName()

ResetProjectName resets all changes to the "project_name" field.

func (*ClaudeSessionMutation) ResetSession

func (m *ClaudeSessionMutation) ResetSession()

ResetSession resets all changes to the "session" edge.

func (*ClaudeSessionMutation) ResetSessionTimeoutMinutes

func (m *ClaudeSessionMutation) ResetSessionTimeoutMinutes()

ResetSessionTimeoutMinutes resets all changes to the "session_timeout_minutes" field.

func (*ClaudeSessionMutation) ResetShowSessionSelector

func (m *ClaudeSessionMutation) ResetShowSessionSelector()

ResetShowSessionSelector resets all changes to the "show_session_selector" field.

func (*ClaudeSessionMutation) SessionCleared

func (m *ClaudeSessionMutation) SessionCleared() bool

SessionCleared reports if the "session" edge to the Session entity was cleared.

func (*ClaudeSessionMutation) SessionID

func (m *ClaudeSessionMutation) SessionID() (id int, exists bool)

SessionID returns the "session" edge ID in the mutation.

func (*ClaudeSessionMutation) SessionIDs

func (m *ClaudeSessionMutation) SessionIDs() (ids []int)

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

func (*ClaudeSessionMutation) SessionTimeoutMinutes

func (m *ClaudeSessionMutation) SessionTimeoutMinutes() (r int, exists bool)

SessionTimeoutMinutes returns the value of the "session_timeout_minutes" field in the mutation.

func (*ClaudeSessionMutation) SetAutoReattach

func (m *ClaudeSessionMutation) SetAutoReattach(b bool)

SetAutoReattach sets the "auto_reattach" field.

func (*ClaudeSessionMutation) SetClaudeSessionID

func (m *ClaudeSessionMutation) SetClaudeSessionID(s string)

SetClaudeSessionID sets the "claude_session_id" field.

func (*ClaudeSessionMutation) SetConversationID

func (m *ClaudeSessionMutation) SetConversationID(s string)

SetConversationID sets the "conversation_id" field.

func (*ClaudeSessionMutation) SetCreateNewOnMissing

func (m *ClaudeSessionMutation) SetCreateNewOnMissing(b bool)

SetCreateNewOnMissing sets the "create_new_on_missing" field.

func (*ClaudeSessionMutation) SetField

func (m *ClaudeSessionMutation) 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 (*ClaudeSessionMutation) SetLastAttached

func (m *ClaudeSessionMutation) SetLastAttached(t time.Time)

SetLastAttached sets the "last_attached" field.

func (*ClaudeSessionMutation) SetOp

func (m *ClaudeSessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ClaudeSessionMutation) SetPreferredSessionName

func (m *ClaudeSessionMutation) SetPreferredSessionName(s string)

SetPreferredSessionName sets the "preferred_session_name" field.

func (*ClaudeSessionMutation) SetProjectName

func (m *ClaudeSessionMutation) SetProjectName(s string)

SetProjectName sets the "project_name" field.

func (*ClaudeSessionMutation) SetSessionID

func (m *ClaudeSessionMutation) SetSessionID(id int)

SetSessionID sets the "session" edge to the Session entity by id.

func (*ClaudeSessionMutation) SetSessionTimeoutMinutes

func (m *ClaudeSessionMutation) SetSessionTimeoutMinutes(i int)

SetSessionTimeoutMinutes sets the "session_timeout_minutes" field.

func (*ClaudeSessionMutation) SetShowSessionSelector

func (m *ClaudeSessionMutation) SetShowSessionSelector(b bool)

SetShowSessionSelector sets the "show_session_selector" field.

func (*ClaudeSessionMutation) ShowSessionSelector

func (m *ClaudeSessionMutation) ShowSessionSelector() (r bool, exists bool)

ShowSessionSelector returns the value of the "show_session_selector" field in the mutation.

func (ClaudeSessionMutation) Tx

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

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

func (*ClaudeSessionMutation) Type

func (m *ClaudeSessionMutation) Type() string

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

func (*ClaudeSessionMutation) Where

Where appends a list predicates to the ClaudeSessionMutation builder.

func (*ClaudeSessionMutation) WhereP

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

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

type ClaudeSessionQuery

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

ClaudeSessionQuery is the builder for querying ClaudeSession entities.

func (*ClaudeSessionQuery) Aggregate

func (_q *ClaudeSessionQuery) Aggregate(fns ...AggregateFunc) *ClaudeSessionSelect

Aggregate returns a ClaudeSessionSelect configured with the given aggregations.

func (*ClaudeSessionQuery) All

All executes the query and returns a list of ClaudeSessions.

func (*ClaudeSessionQuery) AllX

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

func (*ClaudeSessionQuery) Clone

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

func (*ClaudeSessionQuery) Count

func (_q *ClaudeSessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ClaudeSessionQuery) CountX

func (_q *ClaudeSessionQuery) CountX(ctx context.Context) int

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

func (*ClaudeSessionQuery) Exist

func (_q *ClaudeSessionQuery) Exist(ctx context.Context) (bool, error)

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

func (*ClaudeSessionQuery) ExistX

func (_q *ClaudeSessionQuery) ExistX(ctx context.Context) bool

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

func (*ClaudeSessionQuery) First

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

func (*ClaudeSessionQuery) FirstID

func (_q *ClaudeSessionQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ClaudeSessionQuery) FirstIDX

func (_q *ClaudeSessionQuery) FirstIDX(ctx context.Context) int

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

func (*ClaudeSessionQuery) FirstX

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

func (*ClaudeSessionQuery) GroupBy

func (_q *ClaudeSessionQuery) GroupBy(field string, fields ...string) *ClaudeSessionGroupBy

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

client.ClaudeSession.Query().
	GroupBy(claudesession.FieldClaudeSessionID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ClaudeSessionQuery) IDs

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

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

func (*ClaudeSessionQuery) IDsX

func (_q *ClaudeSessionQuery) IDsX(ctx context.Context) []int

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

func (*ClaudeSessionQuery) Limit

func (_q *ClaudeSessionQuery) Limit(limit int) *ClaudeSessionQuery

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

func (*ClaudeSessionQuery) Offset

func (_q *ClaudeSessionQuery) Offset(offset int) *ClaudeSessionQuery

Offset to start from.

func (*ClaudeSessionQuery) Only

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

func (*ClaudeSessionQuery) OnlyID

func (_q *ClaudeSessionQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ClaudeSessionQuery) OnlyIDX

func (_q *ClaudeSessionQuery) OnlyIDX(ctx context.Context) int

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

func (*ClaudeSessionQuery) OnlyX

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

func (*ClaudeSessionQuery) Order

Order specifies how the records should be ordered.

func (*ClaudeSessionQuery) QueryMetadata

func (_q *ClaudeSessionQuery) QueryMetadata() *ClaudeMetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*ClaudeSessionQuery) QuerySession

func (_q *ClaudeSessionQuery) QuerySession() *SessionQuery

QuerySession chains the current query on the "session" edge.

func (*ClaudeSessionQuery) Select

func (_q *ClaudeSessionQuery) Select(fields ...string) *ClaudeSessionSelect

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

client.ClaudeSession.Query().
	Select(claudesession.FieldClaudeSessionID).
	Scan(ctx, &v)

func (*ClaudeSessionQuery) Unique

func (_q *ClaudeSessionQuery) Unique(unique bool) *ClaudeSessionQuery

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

Where adds a new predicate for the ClaudeSessionQuery builder.

func (*ClaudeSessionQuery) WithMetadata

func (_q *ClaudeSessionQuery) WithMetadata(opts ...func(*ClaudeMetadataQuery)) *ClaudeSessionQuery

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

func (*ClaudeSessionQuery) WithSession

func (_q *ClaudeSessionQuery) WithSession(opts ...func(*SessionQuery)) *ClaudeSessionQuery

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

type ClaudeSessionSelect

type ClaudeSessionSelect struct {
	*ClaudeSessionQuery
	// contains filtered or unexported fields
}

ClaudeSessionSelect is the builder for selecting fields of ClaudeSession entities.

func (*ClaudeSessionSelect) Aggregate

func (_s *ClaudeSessionSelect) Aggregate(fns ...AggregateFunc) *ClaudeSessionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ClaudeSessionSelect) Bool

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

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

func (*ClaudeSessionSelect) BoolX

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

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

func (*ClaudeSessionSelect) Bools

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

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

func (*ClaudeSessionSelect) BoolsX

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

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

func (*ClaudeSessionSelect) Float64

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

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

func (*ClaudeSessionSelect) Float64X

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

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

func (*ClaudeSessionSelect) Float64s

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

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

func (*ClaudeSessionSelect) Float64sX

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

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

func (*ClaudeSessionSelect) Int

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

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

func (*ClaudeSessionSelect) IntX

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

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

func (*ClaudeSessionSelect) Ints

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

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

func (*ClaudeSessionSelect) IntsX

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

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

func (*ClaudeSessionSelect) Scan

func (_s *ClaudeSessionSelect) Scan(ctx context.Context, v any) error

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

func (*ClaudeSessionSelect) ScanX

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

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

func (*ClaudeSessionSelect) String

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

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

func (*ClaudeSessionSelect) StringX

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

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

func (*ClaudeSessionSelect) Strings

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

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

func (*ClaudeSessionSelect) StringsX

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

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

type ClaudeSessionUpdate

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

ClaudeSessionUpdate is the builder for updating ClaudeSession entities.

func (*ClaudeSessionUpdate) AddMetadata

func (_u *ClaudeSessionUpdate) AddMetadata(v ...*ClaudeMetadata) *ClaudeSessionUpdate

AddMetadata adds the "metadata" edges to the ClaudeMetadata entity.

func (*ClaudeSessionUpdate) AddMetadatumIDs

func (_u *ClaudeSessionUpdate) AddMetadatumIDs(ids ...int) *ClaudeSessionUpdate

AddMetadatumIDs adds the "metadata" edge to the ClaudeMetadata entity by IDs.

func (*ClaudeSessionUpdate) AddSessionTimeoutMinutes

func (_u *ClaudeSessionUpdate) AddSessionTimeoutMinutes(v int) *ClaudeSessionUpdate

AddSessionTimeoutMinutes adds value to the "session_timeout_minutes" field.

func (*ClaudeSessionUpdate) ClearConversationID

func (_u *ClaudeSessionUpdate) ClearConversationID() *ClaudeSessionUpdate

ClearConversationID clears the value of the "conversation_id" field.

func (*ClaudeSessionUpdate) ClearLastAttached

func (_u *ClaudeSessionUpdate) ClearLastAttached() *ClaudeSessionUpdate

ClearLastAttached clears the value of the "last_attached" field.

func (*ClaudeSessionUpdate) ClearMetadata

func (_u *ClaudeSessionUpdate) ClearMetadata() *ClaudeSessionUpdate

ClearMetadata clears all "metadata" edges to the ClaudeMetadata entity.

func (*ClaudeSessionUpdate) ClearPreferredSessionName

func (_u *ClaudeSessionUpdate) ClearPreferredSessionName() *ClaudeSessionUpdate

ClearPreferredSessionName clears the value of the "preferred_session_name" field.

func (*ClaudeSessionUpdate) ClearProjectName

func (_u *ClaudeSessionUpdate) ClearProjectName() *ClaudeSessionUpdate

ClearProjectName clears the value of the "project_name" field.

func (*ClaudeSessionUpdate) ClearSession

func (_u *ClaudeSessionUpdate) ClearSession() *ClaudeSessionUpdate

ClearSession clears the "session" edge to the Session entity.

func (*ClaudeSessionUpdate) Exec

func (_u *ClaudeSessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClaudeSessionUpdate) ExecX

func (_u *ClaudeSessionUpdate) ExecX(ctx context.Context)

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

func (*ClaudeSessionUpdate) Mutation

Mutation returns the ClaudeSessionMutation object of the builder.

func (*ClaudeSessionUpdate) RemoveMetadata

func (_u *ClaudeSessionUpdate) RemoveMetadata(v ...*ClaudeMetadata) *ClaudeSessionUpdate

RemoveMetadata removes "metadata" edges to ClaudeMetadata entities.

func (*ClaudeSessionUpdate) RemoveMetadatumIDs

func (_u *ClaudeSessionUpdate) RemoveMetadatumIDs(ids ...int) *ClaudeSessionUpdate

RemoveMetadatumIDs removes the "metadata" edge to ClaudeMetadata entities by IDs.

func (*ClaudeSessionUpdate) Save

func (_u *ClaudeSessionUpdate) Save(ctx context.Context) (int, error)

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

func (*ClaudeSessionUpdate) SaveX

func (_u *ClaudeSessionUpdate) SaveX(ctx context.Context) int

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

func (*ClaudeSessionUpdate) SetAutoReattach

func (_u *ClaudeSessionUpdate) SetAutoReattach(v bool) *ClaudeSessionUpdate

SetAutoReattach sets the "auto_reattach" field.

func (*ClaudeSessionUpdate) SetClaudeSessionID

func (_u *ClaudeSessionUpdate) SetClaudeSessionID(v string) *ClaudeSessionUpdate

SetClaudeSessionID sets the "claude_session_id" field.

func (*ClaudeSessionUpdate) SetConversationID

func (_u *ClaudeSessionUpdate) SetConversationID(v string) *ClaudeSessionUpdate

SetConversationID sets the "conversation_id" field.

func (*ClaudeSessionUpdate) SetCreateNewOnMissing

func (_u *ClaudeSessionUpdate) SetCreateNewOnMissing(v bool) *ClaudeSessionUpdate

SetCreateNewOnMissing sets the "create_new_on_missing" field.

func (*ClaudeSessionUpdate) SetLastAttached

func (_u *ClaudeSessionUpdate) SetLastAttached(v time.Time) *ClaudeSessionUpdate

SetLastAttached sets the "last_attached" field.

func (*ClaudeSessionUpdate) SetNillableAutoReattach

func (_u *ClaudeSessionUpdate) SetNillableAutoReattach(v *bool) *ClaudeSessionUpdate

SetNillableAutoReattach sets the "auto_reattach" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillableClaudeSessionID

func (_u *ClaudeSessionUpdate) SetNillableClaudeSessionID(v *string) *ClaudeSessionUpdate

SetNillableClaudeSessionID sets the "claude_session_id" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillableConversationID

func (_u *ClaudeSessionUpdate) SetNillableConversationID(v *string) *ClaudeSessionUpdate

SetNillableConversationID sets the "conversation_id" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillableCreateNewOnMissing

func (_u *ClaudeSessionUpdate) SetNillableCreateNewOnMissing(v *bool) *ClaudeSessionUpdate

SetNillableCreateNewOnMissing sets the "create_new_on_missing" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillableLastAttached

func (_u *ClaudeSessionUpdate) SetNillableLastAttached(v *time.Time) *ClaudeSessionUpdate

SetNillableLastAttached sets the "last_attached" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillablePreferredSessionName

func (_u *ClaudeSessionUpdate) SetNillablePreferredSessionName(v *string) *ClaudeSessionUpdate

SetNillablePreferredSessionName sets the "preferred_session_name" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillableProjectName

func (_u *ClaudeSessionUpdate) SetNillableProjectName(v *string) *ClaudeSessionUpdate

SetNillableProjectName sets the "project_name" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillableSessionTimeoutMinutes

func (_u *ClaudeSessionUpdate) SetNillableSessionTimeoutMinutes(v *int) *ClaudeSessionUpdate

SetNillableSessionTimeoutMinutes sets the "session_timeout_minutes" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetNillableShowSessionSelector

func (_u *ClaudeSessionUpdate) SetNillableShowSessionSelector(v *bool) *ClaudeSessionUpdate

SetNillableShowSessionSelector sets the "show_session_selector" field if the given value is not nil.

func (*ClaudeSessionUpdate) SetPreferredSessionName

func (_u *ClaudeSessionUpdate) SetPreferredSessionName(v string) *ClaudeSessionUpdate

SetPreferredSessionName sets the "preferred_session_name" field.

func (*ClaudeSessionUpdate) SetProjectName

func (_u *ClaudeSessionUpdate) SetProjectName(v string) *ClaudeSessionUpdate

SetProjectName sets the "project_name" field.

func (*ClaudeSessionUpdate) SetSession

func (_u *ClaudeSessionUpdate) SetSession(v *Session) *ClaudeSessionUpdate

SetSession sets the "session" edge to the Session entity.

func (*ClaudeSessionUpdate) SetSessionID

func (_u *ClaudeSessionUpdate) SetSessionID(id int) *ClaudeSessionUpdate

SetSessionID sets the "session" edge to the Session entity by ID.

func (*ClaudeSessionUpdate) SetSessionTimeoutMinutes

func (_u *ClaudeSessionUpdate) SetSessionTimeoutMinutes(v int) *ClaudeSessionUpdate

SetSessionTimeoutMinutes sets the "session_timeout_minutes" field.

func (*ClaudeSessionUpdate) SetShowSessionSelector

func (_u *ClaudeSessionUpdate) SetShowSessionSelector(v bool) *ClaudeSessionUpdate

SetShowSessionSelector sets the "show_session_selector" field.

func (*ClaudeSessionUpdate) Where

Where appends a list predicates to the ClaudeSessionUpdate builder.

type ClaudeSessionUpdateOne

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

ClaudeSessionUpdateOne is the builder for updating a single ClaudeSession entity.

func (*ClaudeSessionUpdateOne) AddMetadata

AddMetadata adds the "metadata" edges to the ClaudeMetadata entity.

func (*ClaudeSessionUpdateOne) AddMetadatumIDs

func (_u *ClaudeSessionUpdateOne) AddMetadatumIDs(ids ...int) *ClaudeSessionUpdateOne

AddMetadatumIDs adds the "metadata" edge to the ClaudeMetadata entity by IDs.

func (*ClaudeSessionUpdateOne) AddSessionTimeoutMinutes

func (_u *ClaudeSessionUpdateOne) AddSessionTimeoutMinutes(v int) *ClaudeSessionUpdateOne

AddSessionTimeoutMinutes adds value to the "session_timeout_minutes" field.

func (*ClaudeSessionUpdateOne) ClearConversationID

func (_u *ClaudeSessionUpdateOne) ClearConversationID() *ClaudeSessionUpdateOne

ClearConversationID clears the value of the "conversation_id" field.

func (*ClaudeSessionUpdateOne) ClearLastAttached

func (_u *ClaudeSessionUpdateOne) ClearLastAttached() *ClaudeSessionUpdateOne

ClearLastAttached clears the value of the "last_attached" field.

func (*ClaudeSessionUpdateOne) ClearMetadata

func (_u *ClaudeSessionUpdateOne) ClearMetadata() *ClaudeSessionUpdateOne

ClearMetadata clears all "metadata" edges to the ClaudeMetadata entity.

func (*ClaudeSessionUpdateOne) ClearPreferredSessionName

func (_u *ClaudeSessionUpdateOne) ClearPreferredSessionName() *ClaudeSessionUpdateOne

ClearPreferredSessionName clears the value of the "preferred_session_name" field.

func (*ClaudeSessionUpdateOne) ClearProjectName

func (_u *ClaudeSessionUpdateOne) ClearProjectName() *ClaudeSessionUpdateOne

ClearProjectName clears the value of the "project_name" field.

func (*ClaudeSessionUpdateOne) ClearSession

func (_u *ClaudeSessionUpdateOne) ClearSession() *ClaudeSessionUpdateOne

ClearSession clears the "session" edge to the Session entity.

func (*ClaudeSessionUpdateOne) Exec

Exec executes the query on the entity.

func (*ClaudeSessionUpdateOne) ExecX

func (_u *ClaudeSessionUpdateOne) ExecX(ctx context.Context)

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

func (*ClaudeSessionUpdateOne) Mutation

Mutation returns the ClaudeSessionMutation object of the builder.

func (*ClaudeSessionUpdateOne) RemoveMetadata

RemoveMetadata removes "metadata" edges to ClaudeMetadata entities.

func (*ClaudeSessionUpdateOne) RemoveMetadatumIDs

func (_u *ClaudeSessionUpdateOne) RemoveMetadatumIDs(ids ...int) *ClaudeSessionUpdateOne

RemoveMetadatumIDs removes the "metadata" edge to ClaudeMetadata entities by IDs.

func (*ClaudeSessionUpdateOne) Save

Save executes the query and returns the updated ClaudeSession entity.

func (*ClaudeSessionUpdateOne) SaveX

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

func (*ClaudeSessionUpdateOne) Select

func (_u *ClaudeSessionUpdateOne) Select(field string, fields ...string) *ClaudeSessionUpdateOne

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

func (*ClaudeSessionUpdateOne) SetAutoReattach

func (_u *ClaudeSessionUpdateOne) SetAutoReattach(v bool) *ClaudeSessionUpdateOne

SetAutoReattach sets the "auto_reattach" field.

func (*ClaudeSessionUpdateOne) SetClaudeSessionID

func (_u *ClaudeSessionUpdateOne) SetClaudeSessionID(v string) *ClaudeSessionUpdateOne

SetClaudeSessionID sets the "claude_session_id" field.

func (*ClaudeSessionUpdateOne) SetConversationID

func (_u *ClaudeSessionUpdateOne) SetConversationID(v string) *ClaudeSessionUpdateOne

SetConversationID sets the "conversation_id" field.

func (*ClaudeSessionUpdateOne) SetCreateNewOnMissing

func (_u *ClaudeSessionUpdateOne) SetCreateNewOnMissing(v bool) *ClaudeSessionUpdateOne

SetCreateNewOnMissing sets the "create_new_on_missing" field.

func (*ClaudeSessionUpdateOne) SetLastAttached

func (_u *ClaudeSessionUpdateOne) SetLastAttached(v time.Time) *ClaudeSessionUpdateOne

SetLastAttached sets the "last_attached" field.

func (*ClaudeSessionUpdateOne) SetNillableAutoReattach

func (_u *ClaudeSessionUpdateOne) SetNillableAutoReattach(v *bool) *ClaudeSessionUpdateOne

SetNillableAutoReattach sets the "auto_reattach" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillableClaudeSessionID

func (_u *ClaudeSessionUpdateOne) SetNillableClaudeSessionID(v *string) *ClaudeSessionUpdateOne

SetNillableClaudeSessionID sets the "claude_session_id" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillableConversationID

func (_u *ClaudeSessionUpdateOne) SetNillableConversationID(v *string) *ClaudeSessionUpdateOne

SetNillableConversationID sets the "conversation_id" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillableCreateNewOnMissing

func (_u *ClaudeSessionUpdateOne) SetNillableCreateNewOnMissing(v *bool) *ClaudeSessionUpdateOne

SetNillableCreateNewOnMissing sets the "create_new_on_missing" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillableLastAttached

func (_u *ClaudeSessionUpdateOne) SetNillableLastAttached(v *time.Time) *ClaudeSessionUpdateOne

SetNillableLastAttached sets the "last_attached" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillablePreferredSessionName

func (_u *ClaudeSessionUpdateOne) SetNillablePreferredSessionName(v *string) *ClaudeSessionUpdateOne

SetNillablePreferredSessionName sets the "preferred_session_name" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillableProjectName

func (_u *ClaudeSessionUpdateOne) SetNillableProjectName(v *string) *ClaudeSessionUpdateOne

SetNillableProjectName sets the "project_name" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillableSessionTimeoutMinutes

func (_u *ClaudeSessionUpdateOne) SetNillableSessionTimeoutMinutes(v *int) *ClaudeSessionUpdateOne

SetNillableSessionTimeoutMinutes sets the "session_timeout_minutes" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetNillableShowSessionSelector

func (_u *ClaudeSessionUpdateOne) SetNillableShowSessionSelector(v *bool) *ClaudeSessionUpdateOne

SetNillableShowSessionSelector sets the "show_session_selector" field if the given value is not nil.

func (*ClaudeSessionUpdateOne) SetPreferredSessionName

func (_u *ClaudeSessionUpdateOne) SetPreferredSessionName(v string) *ClaudeSessionUpdateOne

SetPreferredSessionName sets the "preferred_session_name" field.

func (*ClaudeSessionUpdateOne) SetProjectName

func (_u *ClaudeSessionUpdateOne) SetProjectName(v string) *ClaudeSessionUpdateOne

SetProjectName sets the "project_name" field.

func (*ClaudeSessionUpdateOne) SetSession

SetSession sets the "session" edge to the Session entity.

func (*ClaudeSessionUpdateOne) SetSessionID

func (_u *ClaudeSessionUpdateOne) SetSessionID(id int) *ClaudeSessionUpdateOne

SetSessionID sets the "session" edge to the Session entity by ID.

func (*ClaudeSessionUpdateOne) SetSessionTimeoutMinutes

func (_u *ClaudeSessionUpdateOne) SetSessionTimeoutMinutes(v int) *ClaudeSessionUpdateOne

SetSessionTimeoutMinutes sets the "session_timeout_minutes" field.

func (*ClaudeSessionUpdateOne) SetShowSessionSelector

func (_u *ClaudeSessionUpdateOne) SetShowSessionSelector(v bool) *ClaudeSessionUpdateOne

SetShowSessionSelector sets the "show_session_selector" field.

func (*ClaudeSessionUpdateOne) Where

Where appends a list predicates to the ClaudeSessionUpdate builder.

type ClaudeSessionUpsert added in v1.12.0

type ClaudeSessionUpsert struct {
	*sql.UpdateSet
}

ClaudeSessionUpsert is the "OnConflict" setter.

func (*ClaudeSessionUpsert) AddSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsert) AddSessionTimeoutMinutes(v int) *ClaudeSessionUpsert

AddSessionTimeoutMinutes adds v to the "session_timeout_minutes" field.

func (*ClaudeSessionUpsert) ClearConversationID added in v1.12.0

func (u *ClaudeSessionUpsert) ClearConversationID() *ClaudeSessionUpsert

ClearConversationID clears the value of the "conversation_id" field.

func (*ClaudeSessionUpsert) ClearLastAttached added in v1.12.0

func (u *ClaudeSessionUpsert) ClearLastAttached() *ClaudeSessionUpsert

ClearLastAttached clears the value of the "last_attached" field.

func (*ClaudeSessionUpsert) ClearPreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsert) ClearPreferredSessionName() *ClaudeSessionUpsert

ClearPreferredSessionName clears the value of the "preferred_session_name" field.

func (*ClaudeSessionUpsert) ClearProjectName added in v1.12.0

func (u *ClaudeSessionUpsert) ClearProjectName() *ClaudeSessionUpsert

ClearProjectName clears the value of the "project_name" field.

func (*ClaudeSessionUpsert) SetAutoReattach added in v1.12.0

func (u *ClaudeSessionUpsert) SetAutoReattach(v bool) *ClaudeSessionUpsert

SetAutoReattach sets the "auto_reattach" field.

func (*ClaudeSessionUpsert) SetClaudeSessionID added in v1.12.0

func (u *ClaudeSessionUpsert) SetClaudeSessionID(v string) *ClaudeSessionUpsert

SetClaudeSessionID sets the "claude_session_id" field.

func (*ClaudeSessionUpsert) SetConversationID added in v1.12.0

func (u *ClaudeSessionUpsert) SetConversationID(v string) *ClaudeSessionUpsert

SetConversationID sets the "conversation_id" field.

func (*ClaudeSessionUpsert) SetCreateNewOnMissing added in v1.12.0

func (u *ClaudeSessionUpsert) SetCreateNewOnMissing(v bool) *ClaudeSessionUpsert

SetCreateNewOnMissing sets the "create_new_on_missing" field.

func (*ClaudeSessionUpsert) SetLastAttached added in v1.12.0

func (u *ClaudeSessionUpsert) SetLastAttached(v time.Time) *ClaudeSessionUpsert

SetLastAttached sets the "last_attached" field.

func (*ClaudeSessionUpsert) SetPreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsert) SetPreferredSessionName(v string) *ClaudeSessionUpsert

SetPreferredSessionName sets the "preferred_session_name" field.

func (*ClaudeSessionUpsert) SetProjectName added in v1.12.0

func (u *ClaudeSessionUpsert) SetProjectName(v string) *ClaudeSessionUpsert

SetProjectName sets the "project_name" field.

func (*ClaudeSessionUpsert) SetSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsert) SetSessionTimeoutMinutes(v int) *ClaudeSessionUpsert

SetSessionTimeoutMinutes sets the "session_timeout_minutes" field.

func (*ClaudeSessionUpsert) SetShowSessionSelector added in v1.12.0

func (u *ClaudeSessionUpsert) SetShowSessionSelector(v bool) *ClaudeSessionUpsert

SetShowSessionSelector sets the "show_session_selector" field.

func (*ClaudeSessionUpsert) UpdateAutoReattach added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateAutoReattach() *ClaudeSessionUpsert

UpdateAutoReattach sets the "auto_reattach" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdateClaudeSessionID added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateClaudeSessionID() *ClaudeSessionUpsert

UpdateClaudeSessionID sets the "claude_session_id" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdateConversationID added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateConversationID() *ClaudeSessionUpsert

UpdateConversationID sets the "conversation_id" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdateCreateNewOnMissing added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateCreateNewOnMissing() *ClaudeSessionUpsert

UpdateCreateNewOnMissing sets the "create_new_on_missing" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdateLastAttached added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateLastAttached() *ClaudeSessionUpsert

UpdateLastAttached sets the "last_attached" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdatePreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsert) UpdatePreferredSessionName() *ClaudeSessionUpsert

UpdatePreferredSessionName sets the "preferred_session_name" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdateProjectName added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateProjectName() *ClaudeSessionUpsert

UpdateProjectName sets the "project_name" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdateSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateSessionTimeoutMinutes() *ClaudeSessionUpsert

UpdateSessionTimeoutMinutes sets the "session_timeout_minutes" field to the value that was provided on create.

func (*ClaudeSessionUpsert) UpdateShowSessionSelector added in v1.12.0

func (u *ClaudeSessionUpsert) UpdateShowSessionSelector() *ClaudeSessionUpsert

UpdateShowSessionSelector sets the "show_session_selector" field to the value that was provided on create.

type ClaudeSessionUpsertBulk added in v1.12.0

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

ClaudeSessionUpsertBulk is the builder for "upsert"-ing a bulk of ClaudeSession nodes.

func (*ClaudeSessionUpsertBulk) AddSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsertBulk) AddSessionTimeoutMinutes(v int) *ClaudeSessionUpsertBulk

AddSessionTimeoutMinutes adds v to the "session_timeout_minutes" field.

func (*ClaudeSessionUpsertBulk) ClearConversationID added in v1.12.0

func (u *ClaudeSessionUpsertBulk) ClearConversationID() *ClaudeSessionUpsertBulk

ClearConversationID clears the value of the "conversation_id" field.

func (*ClaudeSessionUpsertBulk) ClearLastAttached added in v1.12.0

func (u *ClaudeSessionUpsertBulk) ClearLastAttached() *ClaudeSessionUpsertBulk

ClearLastAttached clears the value of the "last_attached" field.

func (*ClaudeSessionUpsertBulk) ClearPreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsertBulk) ClearPreferredSessionName() *ClaudeSessionUpsertBulk

ClearPreferredSessionName clears the value of the "preferred_session_name" field.

func (*ClaudeSessionUpsertBulk) ClearProjectName added in v1.12.0

func (u *ClaudeSessionUpsertBulk) ClearProjectName() *ClaudeSessionUpsertBulk

ClearProjectName clears the value of the "project_name" field.

func (*ClaudeSessionUpsertBulk) DoNothing added in v1.12.0

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

func (*ClaudeSessionUpsertBulk) Exec added in v1.12.0

Exec executes the query.

func (*ClaudeSessionUpsertBulk) ExecX added in v1.12.0

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

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

func (*ClaudeSessionUpsertBulk) Ignore added in v1.12.0

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

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

func (*ClaudeSessionUpsertBulk) SetAutoReattach added in v1.12.0

func (u *ClaudeSessionUpsertBulk) SetAutoReattach(v bool) *ClaudeSessionUpsertBulk

SetAutoReattach sets the "auto_reattach" field.

func (*ClaudeSessionUpsertBulk) SetClaudeSessionID added in v1.12.0

func (u *ClaudeSessionUpsertBulk) SetClaudeSessionID(v string) *ClaudeSessionUpsertBulk

SetClaudeSessionID sets the "claude_session_id" field.

func (*ClaudeSessionUpsertBulk) SetConversationID added in v1.12.0

func (u *ClaudeSessionUpsertBulk) SetConversationID(v string) *ClaudeSessionUpsertBulk

SetConversationID sets the "conversation_id" field.

func (*ClaudeSessionUpsertBulk) SetCreateNewOnMissing added in v1.12.0

func (u *ClaudeSessionUpsertBulk) SetCreateNewOnMissing(v bool) *ClaudeSessionUpsertBulk

SetCreateNewOnMissing sets the "create_new_on_missing" field.

func (*ClaudeSessionUpsertBulk) SetLastAttached added in v1.12.0

SetLastAttached sets the "last_attached" field.

func (*ClaudeSessionUpsertBulk) SetPreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsertBulk) SetPreferredSessionName(v string) *ClaudeSessionUpsertBulk

SetPreferredSessionName sets the "preferred_session_name" field.

func (*ClaudeSessionUpsertBulk) SetProjectName added in v1.12.0

SetProjectName sets the "project_name" field.

func (*ClaudeSessionUpsertBulk) SetSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsertBulk) SetSessionTimeoutMinutes(v int) *ClaudeSessionUpsertBulk

SetSessionTimeoutMinutes sets the "session_timeout_minutes" field.

func (*ClaudeSessionUpsertBulk) SetShowSessionSelector added in v1.12.0

func (u *ClaudeSessionUpsertBulk) SetShowSessionSelector(v bool) *ClaudeSessionUpsertBulk

SetShowSessionSelector sets the "show_session_selector" field.

func (*ClaudeSessionUpsertBulk) Update added in v1.12.0

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

func (*ClaudeSessionUpsertBulk) UpdateAutoReattach added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateAutoReattach() *ClaudeSessionUpsertBulk

UpdateAutoReattach sets the "auto_reattach" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateClaudeSessionID added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateClaudeSessionID() *ClaudeSessionUpsertBulk

UpdateClaudeSessionID sets the "claude_session_id" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateConversationID added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateConversationID() *ClaudeSessionUpsertBulk

UpdateConversationID sets the "conversation_id" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateCreateNewOnMissing added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateCreateNewOnMissing() *ClaudeSessionUpsertBulk

UpdateCreateNewOnMissing sets the "create_new_on_missing" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateLastAttached added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateLastAttached() *ClaudeSessionUpsertBulk

UpdateLastAttached sets the "last_attached" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateNewValues added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateNewValues() *ClaudeSessionUpsertBulk

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

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

func (*ClaudeSessionUpsertBulk) UpdatePreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdatePreferredSessionName() *ClaudeSessionUpsertBulk

UpdatePreferredSessionName sets the "preferred_session_name" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateProjectName added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateProjectName() *ClaudeSessionUpsertBulk

UpdateProjectName sets the "project_name" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateSessionTimeoutMinutes() *ClaudeSessionUpsertBulk

UpdateSessionTimeoutMinutes sets the "session_timeout_minutes" field to the value that was provided on create.

func (*ClaudeSessionUpsertBulk) UpdateShowSessionSelector added in v1.12.0

func (u *ClaudeSessionUpsertBulk) UpdateShowSessionSelector() *ClaudeSessionUpsertBulk

UpdateShowSessionSelector sets the "show_session_selector" field to the value that was provided on create.

type ClaudeSessionUpsertOne added in v1.12.0

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

ClaudeSessionUpsertOne is the builder for "upsert"-ing

one ClaudeSession node.

func (*ClaudeSessionUpsertOne) AddSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsertOne) AddSessionTimeoutMinutes(v int) *ClaudeSessionUpsertOne

AddSessionTimeoutMinutes adds v to the "session_timeout_minutes" field.

func (*ClaudeSessionUpsertOne) ClearConversationID added in v1.12.0

func (u *ClaudeSessionUpsertOne) ClearConversationID() *ClaudeSessionUpsertOne

ClearConversationID clears the value of the "conversation_id" field.

func (*ClaudeSessionUpsertOne) ClearLastAttached added in v1.12.0

func (u *ClaudeSessionUpsertOne) ClearLastAttached() *ClaudeSessionUpsertOne

ClearLastAttached clears the value of the "last_attached" field.

func (*ClaudeSessionUpsertOne) ClearPreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsertOne) ClearPreferredSessionName() *ClaudeSessionUpsertOne

ClearPreferredSessionName clears the value of the "preferred_session_name" field.

func (*ClaudeSessionUpsertOne) ClearProjectName added in v1.12.0

func (u *ClaudeSessionUpsertOne) ClearProjectName() *ClaudeSessionUpsertOne

ClearProjectName clears the value of the "project_name" field.

func (*ClaudeSessionUpsertOne) DoNothing added in v1.12.0

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

func (*ClaudeSessionUpsertOne) Exec added in v1.12.0

Exec executes the query.

func (*ClaudeSessionUpsertOne) ExecX added in v1.12.0

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

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

func (*ClaudeSessionUpsertOne) ID added in v1.12.0

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

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

func (*ClaudeSessionUpsertOne) IDX added in v1.12.0

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

func (*ClaudeSessionUpsertOne) Ignore added in v1.12.0

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

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

func (*ClaudeSessionUpsertOne) SetAutoReattach added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetAutoReattach(v bool) *ClaudeSessionUpsertOne

SetAutoReattach sets the "auto_reattach" field.

func (*ClaudeSessionUpsertOne) SetClaudeSessionID added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetClaudeSessionID(v string) *ClaudeSessionUpsertOne

SetClaudeSessionID sets the "claude_session_id" field.

func (*ClaudeSessionUpsertOne) SetConversationID added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetConversationID(v string) *ClaudeSessionUpsertOne

SetConversationID sets the "conversation_id" field.

func (*ClaudeSessionUpsertOne) SetCreateNewOnMissing added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetCreateNewOnMissing(v bool) *ClaudeSessionUpsertOne

SetCreateNewOnMissing sets the "create_new_on_missing" field.

func (*ClaudeSessionUpsertOne) SetLastAttached added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetLastAttached(v time.Time) *ClaudeSessionUpsertOne

SetLastAttached sets the "last_attached" field.

func (*ClaudeSessionUpsertOne) SetPreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetPreferredSessionName(v string) *ClaudeSessionUpsertOne

SetPreferredSessionName sets the "preferred_session_name" field.

func (*ClaudeSessionUpsertOne) SetProjectName added in v1.12.0

SetProjectName sets the "project_name" field.

func (*ClaudeSessionUpsertOne) SetSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetSessionTimeoutMinutes(v int) *ClaudeSessionUpsertOne

SetSessionTimeoutMinutes sets the "session_timeout_minutes" field.

func (*ClaudeSessionUpsertOne) SetShowSessionSelector added in v1.12.0

func (u *ClaudeSessionUpsertOne) SetShowSessionSelector(v bool) *ClaudeSessionUpsertOne

SetShowSessionSelector sets the "show_session_selector" field.

func (*ClaudeSessionUpsertOne) Update added in v1.12.0

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

func (*ClaudeSessionUpsertOne) UpdateAutoReattach added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateAutoReattach() *ClaudeSessionUpsertOne

UpdateAutoReattach sets the "auto_reattach" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateClaudeSessionID added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateClaudeSessionID() *ClaudeSessionUpsertOne

UpdateClaudeSessionID sets the "claude_session_id" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateConversationID added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateConversationID() *ClaudeSessionUpsertOne

UpdateConversationID sets the "conversation_id" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateCreateNewOnMissing added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateCreateNewOnMissing() *ClaudeSessionUpsertOne

UpdateCreateNewOnMissing sets the "create_new_on_missing" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateLastAttached added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateLastAttached() *ClaudeSessionUpsertOne

UpdateLastAttached sets the "last_attached" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateNewValues added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateNewValues() *ClaudeSessionUpsertOne

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

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

func (*ClaudeSessionUpsertOne) UpdatePreferredSessionName added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdatePreferredSessionName() *ClaudeSessionUpsertOne

UpdatePreferredSessionName sets the "preferred_session_name" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateProjectName added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateProjectName() *ClaudeSessionUpsertOne

UpdateProjectName sets the "project_name" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateSessionTimeoutMinutes added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateSessionTimeoutMinutes() *ClaudeSessionUpsertOne

UpdateSessionTimeoutMinutes sets the "session_timeout_minutes" field to the value that was provided on create.

func (*ClaudeSessionUpsertOne) UpdateShowSessionSelector added in v1.12.0

func (u *ClaudeSessionUpsertOne) UpdateShowSessionSelector() *ClaudeSessionUpsertOne

UpdateShowSessionSelector sets the "show_session_selector" field to the value that was provided on create.

type ClaudeSessions

type ClaudeSessions []*ClaudeSession

ClaudeSessions is a parsable slice of ClaudeSession.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// ApprovalRule is the client for interacting with the ApprovalRule builders.
	ApprovalRule *ApprovalRuleClient
	// ClassificationAnalytics is the client for interacting with the ClassificationAnalytics builders.
	ClassificationAnalytics *ClassificationAnalyticsClient
	// ClaudeMetadata is the client for interacting with the ClaudeMetadata builders.
	ClaudeMetadata *ClaudeMetadataClient
	// ClaudeSession is the client for interacting with the ClaudeSession builders.
	ClaudeSession *ClaudeSessionClient
	// DiffStats is the client for interacting with the DiffStats builders.
	DiffStats *DiffStatsClient
	// Session is the client for interacting with the Session builders.
	Session *SessionClient
	// Tag is the client for interacting with the Tag builders.
	Tag *TagClient
	// Worktree is the client for interacting with the Worktree builders.
	Worktree *WorktreeClient
	// 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().
	ApprovalRule.
	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 DiffStats

type DiffStats struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Added holds the value of the "added" field.
	Added int `json:"added,omitempty"`
	// Removed holds the value of the "removed" field.
	Removed int `json:"removed,omitempty"`
	// Content holds the value of the "content" field.
	Content string `json:"content,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DiffStatsQuery when eager-loading is set.
	Edges DiffStatsEdges `json:"edges"`
	// contains filtered or unexported fields
}

DiffStats is the model entity for the DiffStats schema.

func (*DiffStats) QuerySession

func (_m *DiffStats) QuerySession() *SessionQuery

QuerySession queries the "session" edge of the DiffStats entity.

func (*DiffStats) String

func (_m *DiffStats) String() string

String implements the fmt.Stringer.

func (*DiffStats) Unwrap

func (_m *DiffStats) Unwrap() *DiffStats

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

func (_m *DiffStats) Update() *DiffStatsUpdateOne

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

func (*DiffStats) Value

func (_m *DiffStats) Value(name string) (ent.Value, error)

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

type DiffStatsClient

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

DiffStatsClient is a client for the DiffStats schema.

func NewDiffStatsClient

func NewDiffStatsClient(c config) *DiffStatsClient

NewDiffStatsClient returns a client for the DiffStats from the given config.

func (*DiffStatsClient) Create

func (c *DiffStatsClient) Create() *DiffStatsCreate

Create returns a builder for creating a DiffStats entity.

func (*DiffStatsClient) CreateBulk

func (c *DiffStatsClient) CreateBulk(builders ...*DiffStatsCreate) *DiffStatsCreateBulk

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

func (*DiffStatsClient) Delete

func (c *DiffStatsClient) Delete() *DiffStatsDelete

Delete returns a delete builder for DiffStats.

func (*DiffStatsClient) DeleteOne

func (c *DiffStatsClient) DeleteOne(_m *DiffStats) *DiffStatsDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DiffStatsClient) DeleteOneID

func (c *DiffStatsClient) DeleteOneID(id int) *DiffStatsDeleteOne

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

func (*DiffStatsClient) Get

func (c *DiffStatsClient) Get(ctx context.Context, id int) (*DiffStats, error)

Get returns a DiffStats entity by its id.

func (*DiffStatsClient) GetX

func (c *DiffStatsClient) GetX(ctx context.Context, id int) *DiffStats

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

func (*DiffStatsClient) Hooks

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

Hooks returns the client hooks.

func (*DiffStatsClient) Intercept

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

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

func (*DiffStatsClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DiffStatsClient) MapCreateBulk

func (c *DiffStatsClient) MapCreateBulk(slice any, setFunc func(*DiffStatsCreate, int)) *DiffStatsCreateBulk

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

func (c *DiffStatsClient) Query() *DiffStatsQuery

Query returns a query builder for DiffStats.

func (*DiffStatsClient) QuerySession

func (c *DiffStatsClient) QuerySession(_m *DiffStats) *SessionQuery

QuerySession queries the session edge of a DiffStats.

func (*DiffStatsClient) Update

func (c *DiffStatsClient) Update() *DiffStatsUpdate

Update returns an update builder for DiffStats.

func (*DiffStatsClient) UpdateOne

func (c *DiffStatsClient) UpdateOne(_m *DiffStats) *DiffStatsUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DiffStatsClient) UpdateOneID

func (c *DiffStatsClient) UpdateOneID(id int) *DiffStatsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DiffStatsClient) Use

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

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

type DiffStatsCreate

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

DiffStatsCreate is the builder for creating a DiffStats entity.

func (*DiffStatsCreate) Exec

func (_c *DiffStatsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DiffStatsCreate) ExecX

func (_c *DiffStatsCreate) ExecX(ctx context.Context)

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

func (*DiffStatsCreate) Mutation

func (_c *DiffStatsCreate) Mutation() *DiffStatsMutation

Mutation returns the DiffStatsMutation object of the builder.

func (*DiffStatsCreate) OnConflict added in v1.12.0

func (_c *DiffStatsCreate) OnConflict(opts ...sql.ConflictOption) *DiffStatsUpsertOne

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

client.DiffStats.Create().
	SetAdded(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.DiffStatsUpsert) {
		SetAdded(v+v).
	}).
	Exec(ctx)

func (*DiffStatsCreate) OnConflictColumns added in v1.12.0

func (_c *DiffStatsCreate) OnConflictColumns(columns ...string) *DiffStatsUpsertOne

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

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

func (*DiffStatsCreate) Save

func (_c *DiffStatsCreate) Save(ctx context.Context) (*DiffStats, error)

Save creates the DiffStats in the database.

func (*DiffStatsCreate) SaveX

func (_c *DiffStatsCreate) SaveX(ctx context.Context) *DiffStats

SaveX calls Save and panics if Save returns an error.

func (*DiffStatsCreate) SetAdded

func (_c *DiffStatsCreate) SetAdded(v int) *DiffStatsCreate

SetAdded sets the "added" field.

func (*DiffStatsCreate) SetContent

func (_c *DiffStatsCreate) SetContent(v string) *DiffStatsCreate

SetContent sets the "content" field.

func (*DiffStatsCreate) SetNillableAdded

func (_c *DiffStatsCreate) SetNillableAdded(v *int) *DiffStatsCreate

SetNillableAdded sets the "added" field if the given value is not nil.

func (*DiffStatsCreate) SetNillableContent

func (_c *DiffStatsCreate) SetNillableContent(v *string) *DiffStatsCreate

SetNillableContent sets the "content" field if the given value is not nil.

func (*DiffStatsCreate) SetNillableRemoved

func (_c *DiffStatsCreate) SetNillableRemoved(v *int) *DiffStatsCreate

SetNillableRemoved sets the "removed" field if the given value is not nil.

func (*DiffStatsCreate) SetRemoved

func (_c *DiffStatsCreate) SetRemoved(v int) *DiffStatsCreate

SetRemoved sets the "removed" field.

func (*DiffStatsCreate) SetSession

func (_c *DiffStatsCreate) SetSession(v *Session) *DiffStatsCreate

SetSession sets the "session" edge to the Session entity.

func (*DiffStatsCreate) SetSessionID

func (_c *DiffStatsCreate) SetSessionID(id int) *DiffStatsCreate

SetSessionID sets the "session" edge to the Session entity by ID.

type DiffStatsCreateBulk

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

DiffStatsCreateBulk is the builder for creating many DiffStats entities in bulk.

func (*DiffStatsCreateBulk) Exec

func (_c *DiffStatsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DiffStatsCreateBulk) ExecX

func (_c *DiffStatsCreateBulk) ExecX(ctx context.Context)

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

func (*DiffStatsCreateBulk) OnConflict added in v1.12.0

func (_c *DiffStatsCreateBulk) OnConflict(opts ...sql.ConflictOption) *DiffStatsUpsertBulk

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

client.DiffStats.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.DiffStatsUpsert) {
		SetAdded(v+v).
	}).
	Exec(ctx)

func (*DiffStatsCreateBulk) OnConflictColumns added in v1.12.0

func (_c *DiffStatsCreateBulk) OnConflictColumns(columns ...string) *DiffStatsUpsertBulk

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

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

func (*DiffStatsCreateBulk) Save

func (_c *DiffStatsCreateBulk) Save(ctx context.Context) ([]*DiffStats, error)

Save creates the DiffStats entities in the database.

func (*DiffStatsCreateBulk) SaveX

func (_c *DiffStatsCreateBulk) SaveX(ctx context.Context) []*DiffStats

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

type DiffStatsDelete

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

DiffStatsDelete is the builder for deleting a DiffStats entity.

func (*DiffStatsDelete) Exec

func (_d *DiffStatsDelete) Exec(ctx context.Context) (int, error)

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

func (*DiffStatsDelete) ExecX

func (_d *DiffStatsDelete) ExecX(ctx context.Context) int

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

func (*DiffStatsDelete) Where

Where appends a list predicates to the DiffStatsDelete builder.

type DiffStatsDeleteOne

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

DiffStatsDeleteOne is the builder for deleting a single DiffStats entity.

func (*DiffStatsDeleteOne) Exec

func (_d *DiffStatsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DiffStatsDeleteOne) ExecX

func (_d *DiffStatsDeleteOne) ExecX(ctx context.Context)

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

func (*DiffStatsDeleteOne) Where

Where appends a list predicates to the DiffStatsDelete builder.

type DiffStatsEdges

type DiffStatsEdges struct {
	// Session holds the value of the session edge.
	Session *Session `json:"session,omitempty"`
	// contains filtered or unexported fields
}

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

func (DiffStatsEdges) SessionOrErr

func (e DiffStatsEdges) SessionOrErr() (*Session, error)

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

type DiffStatsGroupBy

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

DiffStatsGroupBy is the group-by builder for DiffStats entities.

func (*DiffStatsGroupBy) Aggregate

func (_g *DiffStatsGroupBy) Aggregate(fns ...AggregateFunc) *DiffStatsGroupBy

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

func (*DiffStatsGroupBy) Bool

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

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

func (*DiffStatsGroupBy) BoolX

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

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

func (*DiffStatsGroupBy) Bools

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

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

func (*DiffStatsGroupBy) BoolsX

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

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

func (*DiffStatsGroupBy) Float64

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

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

func (*DiffStatsGroupBy) Float64X

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

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

func (*DiffStatsGroupBy) Float64s

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

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

func (*DiffStatsGroupBy) Float64sX

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

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

func (*DiffStatsGroupBy) Int

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

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

func (*DiffStatsGroupBy) IntX

func (s *DiffStatsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DiffStatsGroupBy) Ints

func (s *DiffStatsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DiffStatsGroupBy) IntsX

func (s *DiffStatsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DiffStatsGroupBy) Scan

func (_g *DiffStatsGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DiffStatsGroupBy) ScanX

func (s *DiffStatsGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DiffStatsGroupBy) String

func (s *DiffStatsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DiffStatsGroupBy) StringX

func (s *DiffStatsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DiffStatsGroupBy) Strings

func (s *DiffStatsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DiffStatsGroupBy) StringsX

func (s *DiffStatsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DiffStatsMutation

type DiffStatsMutation struct {
	// contains filtered or unexported fields
}

DiffStatsMutation represents an operation that mutates the DiffStats nodes in the graph.

func (*DiffStatsMutation) AddAdded

func (m *DiffStatsMutation) AddAdded(i int)

AddAdded adds i to the "added" field.

func (*DiffStatsMutation) AddField

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) AddRemoved

func (m *DiffStatsMutation) AddRemoved(i int)

AddRemoved adds i to the "removed" field.

func (*DiffStatsMutation) Added

func (m *DiffStatsMutation) Added() (r int, exists bool)

Added returns the value of the "added" field in the mutation.

func (*DiffStatsMutation) AddedAdded

func (m *DiffStatsMutation) AddedAdded() (r int, exists bool)

AddedAdded returns the value that was added to the "added" field in this mutation.

func (*DiffStatsMutation) AddedEdges

func (m *DiffStatsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DiffStatsMutation) AddedField

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) AddedFields

func (m *DiffStatsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DiffStatsMutation) AddedIDs

func (m *DiffStatsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DiffStatsMutation) AddedRemoved

func (m *DiffStatsMutation) AddedRemoved() (r int, exists bool)

AddedRemoved returns the value that was added to the "removed" field in this mutation.

func (*DiffStatsMutation) ClearContent

func (m *DiffStatsMutation) ClearContent()

ClearContent clears the value of the "content" field.

func (*DiffStatsMutation) ClearEdge

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) ClearField

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) ClearSession

func (m *DiffStatsMutation) ClearSession()

ClearSession clears the "session" edge to the Session entity.

func (*DiffStatsMutation) ClearedEdges

func (m *DiffStatsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DiffStatsMutation) ClearedFields

func (m *DiffStatsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DiffStatsMutation) Client

func (m DiffStatsMutation) 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 (*DiffStatsMutation) Content

func (m *DiffStatsMutation) Content() (r string, exists bool)

Content returns the value of the "content" field in the mutation.

func (*DiffStatsMutation) ContentCleared

func (m *DiffStatsMutation) ContentCleared() bool

ContentCleared returns if the "content" field was cleared in this mutation.

func (*DiffStatsMutation) EdgeCleared

func (m *DiffStatsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DiffStatsMutation) Field

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) FieldCleared

func (m *DiffStatsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DiffStatsMutation) Fields

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) ID

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) IDs

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) OldAdded

func (m *DiffStatsMutation) OldAdded(ctx context.Context) (v int, err error)

OldAdded returns the old "added" field's value of the DiffStats entity. If the DiffStats 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 (*DiffStatsMutation) OldContent

func (m *DiffStatsMutation) OldContent(ctx context.Context) (v string, err error)

OldContent returns the old "content" field's value of the DiffStats entity. If the DiffStats 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 (*DiffStatsMutation) OldField

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) OldRemoved

func (m *DiffStatsMutation) OldRemoved(ctx context.Context) (v int, err error)

OldRemoved returns the old "removed" field's value of the DiffStats entity. If the DiffStats 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 (*DiffStatsMutation) Op

func (m *DiffStatsMutation) Op() Op

Op returns the operation name.

func (*DiffStatsMutation) Removed

func (m *DiffStatsMutation) Removed() (r int, exists bool)

Removed returns the value of the "removed" field in the mutation.

func (*DiffStatsMutation) RemovedEdges

func (m *DiffStatsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DiffStatsMutation) RemovedIDs

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) ResetAdded

func (m *DiffStatsMutation) ResetAdded()

ResetAdded resets all changes to the "added" field.

func (*DiffStatsMutation) ResetContent

func (m *DiffStatsMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*DiffStatsMutation) ResetEdge

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) ResetField

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) ResetRemoved

func (m *DiffStatsMutation) ResetRemoved()

ResetRemoved resets all changes to the "removed" field.

func (*DiffStatsMutation) ResetSession

func (m *DiffStatsMutation) ResetSession()

ResetSession resets all changes to the "session" edge.

func (*DiffStatsMutation) SessionCleared

func (m *DiffStatsMutation) SessionCleared() bool

SessionCleared reports if the "session" edge to the Session entity was cleared.

func (*DiffStatsMutation) SessionID

func (m *DiffStatsMutation) SessionID() (id int, exists bool)

SessionID returns the "session" edge ID in the mutation.

func (*DiffStatsMutation) SessionIDs

func (m *DiffStatsMutation) SessionIDs() (ids []int)

SessionIDs returns the "session" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SessionID instead. It exists only for internal usage by the builders.

func (*DiffStatsMutation) SetAdded

func (m *DiffStatsMutation) SetAdded(i int)

SetAdded sets the "added" field.

func (*DiffStatsMutation) SetContent

func (m *DiffStatsMutation) SetContent(s string)

SetContent sets the "content" field.

func (*DiffStatsMutation) SetField

func (m *DiffStatsMutation) 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 (*DiffStatsMutation) SetOp

func (m *DiffStatsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DiffStatsMutation) SetRemoved

func (m *DiffStatsMutation) SetRemoved(i int)

SetRemoved sets the "removed" field.

func (*DiffStatsMutation) SetSessionID

func (m *DiffStatsMutation) SetSessionID(id int)

SetSessionID sets the "session" edge to the Session entity by id.

func (DiffStatsMutation) Tx

func (m DiffStatsMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DiffStatsMutation) Type

func (m *DiffStatsMutation) Type() string

Type returns the node type of this mutation (DiffStats).

func (*DiffStatsMutation) Where

func (m *DiffStatsMutation) Where(ps ...predicate.DiffStats)

Where appends a list predicates to the DiffStatsMutation builder.

func (*DiffStatsMutation) WhereP

func (m *DiffStatsMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DiffStatsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DiffStatsQuery

type DiffStatsQuery struct {
	// contains filtered or unexported fields
}

DiffStatsQuery is the builder for querying DiffStats entities.

func (*DiffStatsQuery) Aggregate

func (_q *DiffStatsQuery) Aggregate(fns ...AggregateFunc) *DiffStatsSelect

Aggregate returns a DiffStatsSelect configured with the given aggregations.

func (*DiffStatsQuery) All

func (_q *DiffStatsQuery) All(ctx context.Context) ([]*DiffStats, error)

All executes the query and returns a list of DiffStatsSlice.

func (*DiffStatsQuery) AllX

func (_q *DiffStatsQuery) AllX(ctx context.Context) []*DiffStats

AllX is like All, but panics if an error occurs.

func (*DiffStatsQuery) Clone

func (_q *DiffStatsQuery) Clone() *DiffStatsQuery

Clone returns a duplicate of the DiffStatsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DiffStatsQuery) Count

func (_q *DiffStatsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DiffStatsQuery) CountX

func (_q *DiffStatsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DiffStatsQuery) Exist

func (_q *DiffStatsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DiffStatsQuery) ExistX

func (_q *DiffStatsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DiffStatsQuery) First

func (_q *DiffStatsQuery) First(ctx context.Context) (*DiffStats, error)

First returns the first DiffStats entity from the query. Returns a *NotFoundError when no DiffStats was found.

func (*DiffStatsQuery) FirstID

func (_q *DiffStatsQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DiffStats ID from the query. Returns a *NotFoundError when no DiffStats ID was found.

func (*DiffStatsQuery) FirstIDX

func (_q *DiffStatsQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DiffStatsQuery) FirstX

func (_q *DiffStatsQuery) FirstX(ctx context.Context) *DiffStats

FirstX is like First, but panics if an error occurs.

func (*DiffStatsQuery) GroupBy

func (_q *DiffStatsQuery) GroupBy(field string, fields ...string) *DiffStatsGroupBy

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 {
	Added int `json:"added,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DiffStats.Query().
	GroupBy(diffstats.FieldAdded).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DiffStatsQuery) IDs

func (_q *DiffStatsQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of DiffStats IDs.

func (*DiffStatsQuery) IDsX

func (_q *DiffStatsQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DiffStatsQuery) Limit

func (_q *DiffStatsQuery) Limit(limit int) *DiffStatsQuery

Limit the number of records to be returned by this query.

func (*DiffStatsQuery) Offset

func (_q *DiffStatsQuery) Offset(offset int) *DiffStatsQuery

Offset to start from.

func (*DiffStatsQuery) Only

func (_q *DiffStatsQuery) Only(ctx context.Context) (*DiffStats, error)

Only returns a single DiffStats entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DiffStats entity is found. Returns a *NotFoundError when no DiffStats entities are found.

func (*DiffStatsQuery) OnlyID

func (_q *DiffStatsQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DiffStats ID in the query. Returns a *NotSingularError when more than one DiffStats ID is found. Returns a *NotFoundError when no entities are found.

func (*DiffStatsQuery) OnlyIDX

func (_q *DiffStatsQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DiffStatsQuery) OnlyX

func (_q *DiffStatsQuery) OnlyX(ctx context.Context) *DiffStats

OnlyX is like Only, but panics if an error occurs.

func (*DiffStatsQuery) Order

Order specifies how the records should be ordered.

func (*DiffStatsQuery) QuerySession

func (_q *DiffStatsQuery) QuerySession() *SessionQuery

QuerySession chains the current query on the "session" edge.

func (*DiffStatsQuery) Select

func (_q *DiffStatsQuery) Select(fields ...string) *DiffStatsSelect

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 {
	Added int `json:"added,omitempty"`
}

client.DiffStats.Query().
	Select(diffstats.FieldAdded).
	Scan(ctx, &v)

func (*DiffStatsQuery) Unique

func (_q *DiffStatsQuery) Unique(unique bool) *DiffStatsQuery

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 (*DiffStatsQuery) Where

Where adds a new predicate for the DiffStatsQuery builder.

func (*DiffStatsQuery) WithSession

func (_q *DiffStatsQuery) WithSession(opts ...func(*SessionQuery)) *DiffStatsQuery

WithSession tells the query-builder to eager-load the nodes that are connected to the "session" edge. The optional arguments are used to configure the query builder of the edge.

type DiffStatsSelect

type DiffStatsSelect struct {
	*DiffStatsQuery
	// contains filtered or unexported fields
}

DiffStatsSelect is the builder for selecting fields of DiffStats entities.

func (*DiffStatsSelect) Aggregate

func (_s *DiffStatsSelect) Aggregate(fns ...AggregateFunc) *DiffStatsSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DiffStatsSelect) Bool

func (s *DiffStatsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) BoolX

func (s *DiffStatsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DiffStatsSelect) Bools

func (s *DiffStatsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) BoolsX

func (s *DiffStatsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DiffStatsSelect) Float64

func (s *DiffStatsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) Float64X

func (s *DiffStatsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DiffStatsSelect) Float64s

func (s *DiffStatsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) Float64sX

func (s *DiffStatsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DiffStatsSelect) Int

func (s *DiffStatsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) IntX

func (s *DiffStatsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DiffStatsSelect) Ints

func (s *DiffStatsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) IntsX

func (s *DiffStatsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DiffStatsSelect) Scan

func (_s *DiffStatsSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DiffStatsSelect) ScanX

func (s *DiffStatsSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DiffStatsSelect) String

func (s *DiffStatsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) StringX

func (s *DiffStatsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DiffStatsSelect) Strings

func (s *DiffStatsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DiffStatsSelect) StringsX

func (s *DiffStatsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DiffStatsSlice

type DiffStatsSlice []*DiffStats

DiffStatsSlice is a parsable slice of DiffStats.

type DiffStatsUpdate

type DiffStatsUpdate struct {
	// contains filtered or unexported fields
}

DiffStatsUpdate is the builder for updating DiffStats entities.

func (*DiffStatsUpdate) AddAdded

func (_u *DiffStatsUpdate) AddAdded(v int) *DiffStatsUpdate

AddAdded adds value to the "added" field.

func (*DiffStatsUpdate) AddRemoved

func (_u *DiffStatsUpdate) AddRemoved(v int) *DiffStatsUpdate

AddRemoved adds value to the "removed" field.

func (*DiffStatsUpdate) ClearContent

func (_u *DiffStatsUpdate) ClearContent() *DiffStatsUpdate

ClearContent clears the value of the "content" field.

func (*DiffStatsUpdate) ClearSession

func (_u *DiffStatsUpdate) ClearSession() *DiffStatsUpdate

ClearSession clears the "session" edge to the Session entity.

func (*DiffStatsUpdate) Exec

func (_u *DiffStatsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DiffStatsUpdate) ExecX

func (_u *DiffStatsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DiffStatsUpdate) Mutation

func (_u *DiffStatsUpdate) Mutation() *DiffStatsMutation

Mutation returns the DiffStatsMutation object of the builder.

func (*DiffStatsUpdate) Save

func (_u *DiffStatsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DiffStatsUpdate) SaveX

func (_u *DiffStatsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DiffStatsUpdate) SetAdded

func (_u *DiffStatsUpdate) SetAdded(v int) *DiffStatsUpdate

SetAdded sets the "added" field.

func (*DiffStatsUpdate) SetContent

func (_u *DiffStatsUpdate) SetContent(v string) *DiffStatsUpdate

SetContent sets the "content" field.

func (*DiffStatsUpdate) SetNillableAdded

func (_u *DiffStatsUpdate) SetNillableAdded(v *int) *DiffStatsUpdate

SetNillableAdded sets the "added" field if the given value is not nil.

func (*DiffStatsUpdate) SetNillableContent

func (_u *DiffStatsUpdate) SetNillableContent(v *string) *DiffStatsUpdate

SetNillableContent sets the "content" field if the given value is not nil.

func (*DiffStatsUpdate) SetNillableRemoved

func (_u *DiffStatsUpdate) SetNillableRemoved(v *int) *DiffStatsUpdate

SetNillableRemoved sets the "removed" field if the given value is not nil.

func (*DiffStatsUpdate) SetRemoved

func (_u *DiffStatsUpdate) SetRemoved(v int) *DiffStatsUpdate

SetRemoved sets the "removed" field.

func (*DiffStatsUpdate) SetSession

func (_u *DiffStatsUpdate) SetSession(v *Session) *DiffStatsUpdate

SetSession sets the "session" edge to the Session entity.

func (*DiffStatsUpdate) SetSessionID

func (_u *DiffStatsUpdate) SetSessionID(id int) *DiffStatsUpdate

SetSessionID sets the "session" edge to the Session entity by ID.

func (*DiffStatsUpdate) Where

Where appends a list predicates to the DiffStatsUpdate builder.

type DiffStatsUpdateOne

type DiffStatsUpdateOne struct {
	// contains filtered or unexported fields
}

DiffStatsUpdateOne is the builder for updating a single DiffStats entity.

func (*DiffStatsUpdateOne) AddAdded

func (_u *DiffStatsUpdateOne) AddAdded(v int) *DiffStatsUpdateOne

AddAdded adds value to the "added" field.

func (*DiffStatsUpdateOne) AddRemoved

func (_u *DiffStatsUpdateOne) AddRemoved(v int) *DiffStatsUpdateOne

AddRemoved adds value to the "removed" field.

func (*DiffStatsUpdateOne) ClearContent

func (_u *DiffStatsUpdateOne) ClearContent() *DiffStatsUpdateOne

ClearContent clears the value of the "content" field.

func (*DiffStatsUpdateOne) ClearSession

func (_u *DiffStatsUpdateOne) ClearSession() *DiffStatsUpdateOne

ClearSession clears the "session" edge to the Session entity.

func (*DiffStatsUpdateOne) Exec

func (_u *DiffStatsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DiffStatsUpdateOne) ExecX

func (_u *DiffStatsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DiffStatsUpdateOne) Mutation

func (_u *DiffStatsUpdateOne) Mutation() *DiffStatsMutation

Mutation returns the DiffStatsMutation object of the builder.

func (*DiffStatsUpdateOne) Save

func (_u *DiffStatsUpdateOne) Save(ctx context.Context) (*DiffStats, error)

Save executes the query and returns the updated DiffStats entity.

func (*DiffStatsUpdateOne) SaveX

func (_u *DiffStatsUpdateOne) SaveX(ctx context.Context) *DiffStats

SaveX is like Save, but panics if an error occurs.

func (*DiffStatsUpdateOne) Select

func (_u *DiffStatsUpdateOne) Select(field string, fields ...string) *DiffStatsUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DiffStatsUpdateOne) SetAdded

func (_u *DiffStatsUpdateOne) SetAdded(v int) *DiffStatsUpdateOne

SetAdded sets the "added" field.

func (*DiffStatsUpdateOne) SetContent

func (_u *DiffStatsUpdateOne) SetContent(v string) *DiffStatsUpdateOne

SetContent sets the "content" field.

func (*DiffStatsUpdateOne) SetNillableAdded

func (_u *DiffStatsUpdateOne) SetNillableAdded(v *int) *DiffStatsUpdateOne

SetNillableAdded sets the "added" field if the given value is not nil.

func (*DiffStatsUpdateOne) SetNillableContent

func (_u *DiffStatsUpdateOne) SetNillableContent(v *string) *DiffStatsUpdateOne

SetNillableContent sets the "content" field if the given value is not nil.

func (*DiffStatsUpdateOne) SetNillableRemoved

func (_u *DiffStatsUpdateOne) SetNillableRemoved(v *int) *DiffStatsUpdateOne

SetNillableRemoved sets the "removed" field if the given value is not nil.

func (*DiffStatsUpdateOne) SetRemoved

func (_u *DiffStatsUpdateOne) SetRemoved(v int) *DiffStatsUpdateOne

SetRemoved sets the "removed" field.

func (*DiffStatsUpdateOne) SetSession

func (_u *DiffStatsUpdateOne) SetSession(v *Session) *DiffStatsUpdateOne

SetSession sets the "session" edge to the Session entity.

func (*DiffStatsUpdateOne) SetSessionID

func (_u *DiffStatsUpdateOne) SetSessionID(id int) *DiffStatsUpdateOne

SetSessionID sets the "session" edge to the Session entity by ID.

func (*DiffStatsUpdateOne) Where

Where appends a list predicates to the DiffStatsUpdate builder.

type DiffStatsUpsert added in v1.12.0

type DiffStatsUpsert struct {
	*sql.UpdateSet
}

DiffStatsUpsert is the "OnConflict" setter.

func (*DiffStatsUpsert) AddAdded added in v1.12.0

func (u *DiffStatsUpsert) AddAdded(v int) *DiffStatsUpsert

AddAdded adds v to the "added" field.

func (*DiffStatsUpsert) AddRemoved added in v1.12.0

func (u *DiffStatsUpsert) AddRemoved(v int) *DiffStatsUpsert

AddRemoved adds v to the "removed" field.

func (*DiffStatsUpsert) ClearContent added in v1.12.0

func (u *DiffStatsUpsert) ClearContent() *DiffStatsUpsert

ClearContent clears the value of the "content" field.

func (*DiffStatsUpsert) SetAdded added in v1.12.0

func (u *DiffStatsUpsert) SetAdded(v int) *DiffStatsUpsert

SetAdded sets the "added" field.

func (*DiffStatsUpsert) SetContent added in v1.12.0

func (u *DiffStatsUpsert) SetContent(v string) *DiffStatsUpsert

SetContent sets the "content" field.

func (*DiffStatsUpsert) SetRemoved added in v1.12.0

func (u *DiffStatsUpsert) SetRemoved(v int) *DiffStatsUpsert

SetRemoved sets the "removed" field.

func (*DiffStatsUpsert) UpdateAdded added in v1.12.0

func (u *DiffStatsUpsert) UpdateAdded() *DiffStatsUpsert

UpdateAdded sets the "added" field to the value that was provided on create.

func (*DiffStatsUpsert) UpdateContent added in v1.12.0

func (u *DiffStatsUpsert) UpdateContent() *DiffStatsUpsert

UpdateContent sets the "content" field to the value that was provided on create.

func (*DiffStatsUpsert) UpdateRemoved added in v1.12.0

func (u *DiffStatsUpsert) UpdateRemoved() *DiffStatsUpsert

UpdateRemoved sets the "removed" field to the value that was provided on create.

type DiffStatsUpsertBulk added in v1.12.0

type DiffStatsUpsertBulk struct {
	// contains filtered or unexported fields
}

DiffStatsUpsertBulk is the builder for "upsert"-ing a bulk of DiffStats nodes.

func (*DiffStatsUpsertBulk) AddAdded added in v1.12.0

AddAdded adds v to the "added" field.

func (*DiffStatsUpsertBulk) AddRemoved added in v1.12.0

func (u *DiffStatsUpsertBulk) AddRemoved(v int) *DiffStatsUpsertBulk

AddRemoved adds v to the "removed" field.

func (*DiffStatsUpsertBulk) ClearContent added in v1.12.0

func (u *DiffStatsUpsertBulk) ClearContent() *DiffStatsUpsertBulk

ClearContent clears the value of the "content" field.

func (*DiffStatsUpsertBulk) DoNothing added in v1.12.0

func (u *DiffStatsUpsertBulk) DoNothing() *DiffStatsUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DiffStatsUpsertBulk) Exec added in v1.12.0

Exec executes the query.

func (*DiffStatsUpsertBulk) ExecX added in v1.12.0

func (u *DiffStatsUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DiffStatsUpsertBulk) Ignore added in v1.12.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DiffStats.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DiffStatsUpsertBulk) SetAdded added in v1.12.0

SetAdded sets the "added" field.

func (*DiffStatsUpsertBulk) SetContent added in v1.12.0

SetContent sets the "content" field.

func (*DiffStatsUpsertBulk) SetRemoved added in v1.12.0

func (u *DiffStatsUpsertBulk) SetRemoved(v int) *DiffStatsUpsertBulk

SetRemoved sets the "removed" field.

func (*DiffStatsUpsertBulk) Update added in v1.12.0

Update allows overriding fields `UPDATE` values. See the DiffStatsCreateBulk.OnConflict documentation for more info.

func (*DiffStatsUpsertBulk) UpdateAdded added in v1.12.0

func (u *DiffStatsUpsertBulk) UpdateAdded() *DiffStatsUpsertBulk

UpdateAdded sets the "added" field to the value that was provided on create.

func (*DiffStatsUpsertBulk) UpdateContent added in v1.12.0

func (u *DiffStatsUpsertBulk) UpdateContent() *DiffStatsUpsertBulk

UpdateContent sets the "content" field to the value that was provided on create.

func (*DiffStatsUpsertBulk) UpdateNewValues added in v1.12.0

func (u *DiffStatsUpsertBulk) UpdateNewValues() *DiffStatsUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DiffStats.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*DiffStatsUpsertBulk) UpdateRemoved added in v1.12.0

func (u *DiffStatsUpsertBulk) UpdateRemoved() *DiffStatsUpsertBulk

UpdateRemoved sets the "removed" field to the value that was provided on create.

type DiffStatsUpsertOne added in v1.12.0

type DiffStatsUpsertOne struct {
	// contains filtered or unexported fields
}

DiffStatsUpsertOne is the builder for "upsert"-ing

one DiffStats node.

func (*DiffStatsUpsertOne) AddAdded added in v1.12.0

func (u *DiffStatsUpsertOne) AddAdded(v int) *DiffStatsUpsertOne

AddAdded adds v to the "added" field.

func (*DiffStatsUpsertOne) AddRemoved added in v1.12.0

func (u *DiffStatsUpsertOne) AddRemoved(v int) *DiffStatsUpsertOne

AddRemoved adds v to the "removed" field.

func (*DiffStatsUpsertOne) ClearContent added in v1.12.0

func (u *DiffStatsUpsertOne) ClearContent() *DiffStatsUpsertOne

ClearContent clears the value of the "content" field.

func (*DiffStatsUpsertOne) DoNothing added in v1.12.0

func (u *DiffStatsUpsertOne) DoNothing() *DiffStatsUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DiffStatsUpsertOne) Exec added in v1.12.0

func (u *DiffStatsUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*DiffStatsUpsertOne) ExecX added in v1.12.0

func (u *DiffStatsUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DiffStatsUpsertOne) ID added in v1.12.0

func (u *DiffStatsUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DiffStatsUpsertOne) IDX added in v1.12.0

func (u *DiffStatsUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*DiffStatsUpsertOne) Ignore added in v1.12.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DiffStats.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DiffStatsUpsertOne) SetAdded added in v1.12.0

func (u *DiffStatsUpsertOne) SetAdded(v int) *DiffStatsUpsertOne

SetAdded sets the "added" field.

func (*DiffStatsUpsertOne) SetContent added in v1.12.0

func (u *DiffStatsUpsertOne) SetContent(v string) *DiffStatsUpsertOne

SetContent sets the "content" field.

func (*DiffStatsUpsertOne) SetRemoved added in v1.12.0

func (u *DiffStatsUpsertOne) SetRemoved(v int) *DiffStatsUpsertOne

SetRemoved sets the "removed" field.

func (*DiffStatsUpsertOne) Update added in v1.12.0

func (u *DiffStatsUpsertOne) Update(set func(*DiffStatsUpsert)) *DiffStatsUpsertOne

Update allows overriding fields `UPDATE` values. See the DiffStatsCreate.OnConflict documentation for more info.

func (*DiffStatsUpsertOne) UpdateAdded added in v1.12.0

func (u *DiffStatsUpsertOne) UpdateAdded() *DiffStatsUpsertOne

UpdateAdded sets the "added" field to the value that was provided on create.

func (*DiffStatsUpsertOne) UpdateContent added in v1.12.0

func (u *DiffStatsUpsertOne) UpdateContent() *DiffStatsUpsertOne

UpdateContent sets the "content" field to the value that was provided on create.

func (*DiffStatsUpsertOne) UpdateNewValues added in v1.12.0

func (u *DiffStatsUpsertOne) UpdateNewValues() *DiffStatsUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DiffStats.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*DiffStatsUpsertOne) UpdateRemoved added in v1.12.0

func (u *DiffStatsUpsertOne) UpdateRemoved() *DiffStatsUpsertOne

UpdateRemoved sets the "removed" field to the value that was provided on create.

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 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 Session

type Session struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Path holds the value of the "path" field.
	Path string `json:"path,omitempty"`
	// WorkingDir holds the value of the "working_dir" field.
	WorkingDir string `json:"working_dir,omitempty"`
	// Branch holds the value of the "branch" field.
	Branch string `json:"branch,omitempty"`
	// Session status: Running, Paused, etc.
	Status int `json:"status,omitempty"`
	// Height holds the value of the "height" field.
	Height int `json:"height,omitempty"`
	// Width holds the value of the "width" field.
	Width int `json:"width,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"`
	// AutoYes holds the value of the "auto_yes" field.
	AutoYes bool `json:"auto_yes,omitempty"`
	// Prompt holds the value of the "prompt" field.
	Prompt string `json:"prompt,omitempty"`
	// Program holds the value of the "program" field.
	Program string `json:"program,omitempty"`
	// ExistingWorktree holds the value of the "existing_worktree" field.
	ExistingWorktree string `json:"existing_worktree,omitempty"`
	// Category holds the value of the "category" field.
	Category string `json:"category,omitempty"`
	// IsExpanded holds the value of the "is_expanded" field.
	IsExpanded bool `json:"is_expanded,omitempty"`
	// SessionType holds the value of the "session_type" field.
	SessionType string `json:"session_type,omitempty"`
	// TmuxPrefix holds the value of the "tmux_prefix" field.
	TmuxPrefix string `json:"tmux_prefix,omitempty"`
	// LastTerminalUpdate holds the value of the "last_terminal_update" field.
	LastTerminalUpdate *time.Time `json:"last_terminal_update,omitempty"`
	// LastMeaningfulOutput holds the value of the "last_meaningful_output" field.
	LastMeaningfulOutput *time.Time `json:"last_meaningful_output,omitempty"`
	// LastOutputSignature holds the value of the "last_output_signature" field.
	LastOutputSignature string `json:"last_output_signature,omitempty"`
	// LastAddedToQueue holds the value of the "last_added_to_queue" field.
	LastAddedToQueue *time.Time `json:"last_added_to_queue,omitempty"`
	// LastViewed holds the value of the "last_viewed" field.
	LastViewed *time.Time `json:"last_viewed,omitempty"`
	// LastAcknowledged holds the value of the "last_acknowledged" field.
	LastAcknowledged *time.Time `json:"last_acknowledged,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SessionQuery when eager-loading is set.
	Edges SessionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Session is the model entity for the Session schema.

func (*Session) QueryClaudeSession

func (_m *Session) QueryClaudeSession() *ClaudeSessionQuery

QueryClaudeSession queries the "claude_session" edge of the Session entity.

func (*Session) QueryDiffStats

func (_m *Session) QueryDiffStats() *DiffStatsQuery

QueryDiffStats queries the "diff_stats" edge of the Session entity.

func (*Session) QueryTags

func (_m *Session) QueryTags() *TagQuery

QueryTags queries the "tags" edge of the Session entity.

func (*Session) QueryWorktree

func (_m *Session) QueryWorktree() *WorktreeQuery

QueryWorktree queries the "worktree" edge of the Session entity.

func (*Session) String

func (_m *Session) String() string

String implements the fmt.Stringer.

func (*Session) Unwrap

func (_m *Session) Unwrap() *Session

Unwrap unwraps the Session 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 (*Session) Update

func (_m *Session) Update() *SessionUpdateOne

Update returns a builder for updating this Session. Note that you need to call Session.Unwrap() before calling this method if this Session was returned from a transaction, and the transaction was committed or rolled back.

func (*Session) Value

func (_m *Session) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Session. This includes values selected through modifiers, order, etc.

type SessionClient

type SessionClient struct {
	// contains filtered or unexported fields
}

SessionClient is a client for the Session schema.

func NewSessionClient

func NewSessionClient(c config) *SessionClient

NewSessionClient returns a client for the Session from the given config.

func (*SessionClient) Create

func (c *SessionClient) Create() *SessionCreate

Create returns a builder for creating a Session entity.

func (*SessionClient) CreateBulk

func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk

CreateBulk returns a builder for creating a bulk of Session entities.

func (*SessionClient) Delete

func (c *SessionClient) Delete() *SessionDelete

Delete returns a delete builder for Session.

func (*SessionClient) DeleteOne

func (c *SessionClient) DeleteOne(_m *Session) *SessionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SessionClient) DeleteOneID

func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SessionClient) Get

func (c *SessionClient) Get(ctx context.Context, id int) (*Session, error)

Get returns a Session entity by its id.

func (*SessionClient) GetX

func (c *SessionClient) GetX(ctx context.Context, id int) *Session

GetX is like Get, but panics if an error occurs.

func (*SessionClient) Hooks

func (c *SessionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SessionClient) Intercept

func (c *SessionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `session.Intercept(f(g(h())))`.

func (*SessionClient) Interceptors

func (c *SessionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SessionClient) MapCreateBulk

func (c *SessionClient) MapCreateBulk(slice any, setFunc func(*SessionCreate, int)) *SessionCreateBulk

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 (*SessionClient) Query

func (c *SessionClient) Query() *SessionQuery

Query returns a query builder for Session.

func (*SessionClient) QueryClaudeSession

func (c *SessionClient) QueryClaudeSession(_m *Session) *ClaudeSessionQuery

QueryClaudeSession queries the claude_session edge of a Session.

func (*SessionClient) QueryDiffStats

func (c *SessionClient) QueryDiffStats(_m *Session) *DiffStatsQuery

QueryDiffStats queries the diff_stats edge of a Session.

func (*SessionClient) QueryTags

func (c *SessionClient) QueryTags(_m *Session) *TagQuery

QueryTags queries the tags edge of a Session.

func (*SessionClient) QueryWorktree

func (c *SessionClient) QueryWorktree(_m *Session) *WorktreeQuery

QueryWorktree queries the worktree edge of a Session.

func (*SessionClient) Update

func (c *SessionClient) Update() *SessionUpdate

Update returns an update builder for Session.

func (*SessionClient) UpdateOne

func (c *SessionClient) UpdateOne(_m *Session) *SessionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SessionClient) UpdateOneID

func (c *SessionClient) UpdateOneID(id int) *SessionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SessionClient) Use

func (c *SessionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.

type SessionCreate

type SessionCreate struct {
	// contains filtered or unexported fields
}

SessionCreate is the builder for creating a Session entity.

func (*SessionCreate) AddTagIDs

func (_c *SessionCreate) AddTagIDs(ids ...int) *SessionCreate

AddTagIDs adds the "tags" edge to the Tag entity by IDs.

func (*SessionCreate) AddTags

func (_c *SessionCreate) AddTags(v ...*Tag) *SessionCreate

AddTags adds the "tags" edges to the Tag entity.

func (*SessionCreate) Exec

func (_c *SessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionCreate) ExecX

func (_c *SessionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionCreate) Mutation

func (_c *SessionCreate) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionCreate) OnConflict added in v1.12.0

func (_c *SessionCreate) OnConflict(opts ...sql.ConflictOption) *SessionUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Session.Create().
	SetTitle(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.SessionUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*SessionCreate) OnConflictColumns added in v1.12.0

func (_c *SessionCreate) OnConflictColumns(columns ...string) *SessionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Session.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SessionCreate) Save

func (_c *SessionCreate) Save(ctx context.Context) (*Session, error)

Save creates the Session in the database.

func (*SessionCreate) SaveX

func (_c *SessionCreate) SaveX(ctx context.Context) *Session

SaveX calls Save and panics if Save returns an error.

func (*SessionCreate) SetAutoYes

func (_c *SessionCreate) SetAutoYes(v bool) *SessionCreate

SetAutoYes sets the "auto_yes" field.

func (*SessionCreate) SetBranch

func (_c *SessionCreate) SetBranch(v string) *SessionCreate

SetBranch sets the "branch" field.

func (*SessionCreate) SetCategory

func (_c *SessionCreate) SetCategory(v string) *SessionCreate

SetCategory sets the "category" field.

func (*SessionCreate) SetClaudeSession

func (_c *SessionCreate) SetClaudeSession(v *ClaudeSession) *SessionCreate

SetClaudeSession sets the "claude_session" edge to the ClaudeSession entity.

func (*SessionCreate) SetClaudeSessionID

func (_c *SessionCreate) SetClaudeSessionID(id int) *SessionCreate

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID.

func (*SessionCreate) SetCreatedAt

func (_c *SessionCreate) SetCreatedAt(v time.Time) *SessionCreate

SetCreatedAt sets the "created_at" field.

func (*SessionCreate) SetDiffStats

func (_c *SessionCreate) SetDiffStats(v *DiffStats) *SessionCreate

SetDiffStats sets the "diff_stats" edge to the DiffStats entity.

func (*SessionCreate) SetDiffStatsID

func (_c *SessionCreate) SetDiffStatsID(id int) *SessionCreate

SetDiffStatsID sets the "diff_stats" edge to the DiffStats entity by ID.

func (*SessionCreate) SetExistingWorktree

func (_c *SessionCreate) SetExistingWorktree(v string) *SessionCreate

SetExistingWorktree sets the "existing_worktree" field.

func (*SessionCreate) SetHeight

func (_c *SessionCreate) SetHeight(v int) *SessionCreate

SetHeight sets the "height" field.

func (*SessionCreate) SetIsExpanded

func (_c *SessionCreate) SetIsExpanded(v bool) *SessionCreate

SetIsExpanded sets the "is_expanded" field.

func (*SessionCreate) SetLastAcknowledged

func (_c *SessionCreate) SetLastAcknowledged(v time.Time) *SessionCreate

SetLastAcknowledged sets the "last_acknowledged" field.

func (*SessionCreate) SetLastAddedToQueue

func (_c *SessionCreate) SetLastAddedToQueue(v time.Time) *SessionCreate

SetLastAddedToQueue sets the "last_added_to_queue" field.

func (*SessionCreate) SetLastMeaningfulOutput

func (_c *SessionCreate) SetLastMeaningfulOutput(v time.Time) *SessionCreate

SetLastMeaningfulOutput sets the "last_meaningful_output" field.

func (*SessionCreate) SetLastOutputSignature

func (_c *SessionCreate) SetLastOutputSignature(v string) *SessionCreate

SetLastOutputSignature sets the "last_output_signature" field.

func (*SessionCreate) SetLastTerminalUpdate

func (_c *SessionCreate) SetLastTerminalUpdate(v time.Time) *SessionCreate

SetLastTerminalUpdate sets the "last_terminal_update" field.

func (*SessionCreate) SetLastViewed

func (_c *SessionCreate) SetLastViewed(v time.Time) *SessionCreate

SetLastViewed sets the "last_viewed" field.

func (*SessionCreate) SetNillableAutoYes

func (_c *SessionCreate) SetNillableAutoYes(v *bool) *SessionCreate

SetNillableAutoYes sets the "auto_yes" field if the given value is not nil.

func (*SessionCreate) SetNillableBranch

func (_c *SessionCreate) SetNillableBranch(v *string) *SessionCreate

SetNillableBranch sets the "branch" field if the given value is not nil.

func (*SessionCreate) SetNillableCategory

func (_c *SessionCreate) SetNillableCategory(v *string) *SessionCreate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*SessionCreate) SetNillableClaudeSessionID

func (_c *SessionCreate) SetNillableClaudeSessionID(id *int) *SessionCreate

SetNillableClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID if the given value is not nil.

func (*SessionCreate) SetNillableCreatedAt

func (_c *SessionCreate) SetNillableCreatedAt(v *time.Time) *SessionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SessionCreate) SetNillableDiffStatsID

func (_c *SessionCreate) SetNillableDiffStatsID(id *int) *SessionCreate

SetNillableDiffStatsID sets the "diff_stats" edge to the DiffStats entity by ID if the given value is not nil.

func (*SessionCreate) SetNillableExistingWorktree

func (_c *SessionCreate) SetNillableExistingWorktree(v *string) *SessionCreate

SetNillableExistingWorktree sets the "existing_worktree" field if the given value is not nil.

func (*SessionCreate) SetNillableHeight

func (_c *SessionCreate) SetNillableHeight(v *int) *SessionCreate

SetNillableHeight sets the "height" field if the given value is not nil.

func (*SessionCreate) SetNillableIsExpanded

func (_c *SessionCreate) SetNillableIsExpanded(v *bool) *SessionCreate

SetNillableIsExpanded sets the "is_expanded" field if the given value is not nil.

func (*SessionCreate) SetNillableLastAcknowledged

func (_c *SessionCreate) SetNillableLastAcknowledged(v *time.Time) *SessionCreate

SetNillableLastAcknowledged sets the "last_acknowledged" field if the given value is not nil.

func (*SessionCreate) SetNillableLastAddedToQueue

func (_c *SessionCreate) SetNillableLastAddedToQueue(v *time.Time) *SessionCreate

SetNillableLastAddedToQueue sets the "last_added_to_queue" field if the given value is not nil.

func (*SessionCreate) SetNillableLastMeaningfulOutput

func (_c *SessionCreate) SetNillableLastMeaningfulOutput(v *time.Time) *SessionCreate

SetNillableLastMeaningfulOutput sets the "last_meaningful_output" field if the given value is not nil.

func (*SessionCreate) SetNillableLastOutputSignature

func (_c *SessionCreate) SetNillableLastOutputSignature(v *string) *SessionCreate

SetNillableLastOutputSignature sets the "last_output_signature" field if the given value is not nil.

func (*SessionCreate) SetNillableLastTerminalUpdate

func (_c *SessionCreate) SetNillableLastTerminalUpdate(v *time.Time) *SessionCreate

SetNillableLastTerminalUpdate sets the "last_terminal_update" field if the given value is not nil.

func (*SessionCreate) SetNillableLastViewed

func (_c *SessionCreate) SetNillableLastViewed(v *time.Time) *SessionCreate

SetNillableLastViewed sets the "last_viewed" field if the given value is not nil.

func (*SessionCreate) SetNillablePrompt

func (_c *SessionCreate) SetNillablePrompt(v *string) *SessionCreate

SetNillablePrompt sets the "prompt" field if the given value is not nil.

func (*SessionCreate) SetNillableSessionType

func (_c *SessionCreate) SetNillableSessionType(v *string) *SessionCreate

SetNillableSessionType sets the "session_type" field if the given value is not nil.

func (*SessionCreate) SetNillableTmuxPrefix

func (_c *SessionCreate) SetNillableTmuxPrefix(v *string) *SessionCreate

SetNillableTmuxPrefix sets the "tmux_prefix" field if the given value is not nil.

func (*SessionCreate) SetNillableUpdatedAt

func (_c *SessionCreate) SetNillableUpdatedAt(v *time.Time) *SessionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SessionCreate) SetNillableWidth

func (_c *SessionCreate) SetNillableWidth(v *int) *SessionCreate

SetNillableWidth sets the "width" field if the given value is not nil.

func (*SessionCreate) SetNillableWorkingDir

func (_c *SessionCreate) SetNillableWorkingDir(v *string) *SessionCreate

SetNillableWorkingDir sets the "working_dir" field if the given value is not nil.

func (*SessionCreate) SetNillableWorktreeID

func (_c *SessionCreate) SetNillableWorktreeID(id *int) *SessionCreate

SetNillableWorktreeID sets the "worktree" edge to the Worktree entity by ID if the given value is not nil.

func (*SessionCreate) SetPath

func (_c *SessionCreate) SetPath(v string) *SessionCreate

SetPath sets the "path" field.

func (*SessionCreate) SetProgram

func (_c *SessionCreate) SetProgram(v string) *SessionCreate

SetProgram sets the "program" field.

func (*SessionCreate) SetPrompt

func (_c *SessionCreate) SetPrompt(v string) *SessionCreate

SetPrompt sets the "prompt" field.

func (*SessionCreate) SetSessionType

func (_c *SessionCreate) SetSessionType(v string) *SessionCreate

SetSessionType sets the "session_type" field.

func (*SessionCreate) SetStatus

func (_c *SessionCreate) SetStatus(v int) *SessionCreate

SetStatus sets the "status" field.

func (*SessionCreate) SetTitle

func (_c *SessionCreate) SetTitle(v string) *SessionCreate

SetTitle sets the "title" field.

func (*SessionCreate) SetTmuxPrefix

func (_c *SessionCreate) SetTmuxPrefix(v string) *SessionCreate

SetTmuxPrefix sets the "tmux_prefix" field.

func (*SessionCreate) SetUpdatedAt

func (_c *SessionCreate) SetUpdatedAt(v time.Time) *SessionCreate

SetUpdatedAt sets the "updated_at" field.

func (*SessionCreate) SetWidth

func (_c *SessionCreate) SetWidth(v int) *SessionCreate

SetWidth sets the "width" field.

func (*SessionCreate) SetWorkingDir

func (_c *SessionCreate) SetWorkingDir(v string) *SessionCreate

SetWorkingDir sets the "working_dir" field.

func (*SessionCreate) SetWorktree

func (_c *SessionCreate) SetWorktree(v *Worktree) *SessionCreate

SetWorktree sets the "worktree" edge to the Worktree entity.

func (*SessionCreate) SetWorktreeID

func (_c *SessionCreate) SetWorktreeID(id int) *SessionCreate

SetWorktreeID sets the "worktree" edge to the Worktree entity by ID.

type SessionCreateBulk

type SessionCreateBulk struct {
	// contains filtered or unexported fields
}

SessionCreateBulk is the builder for creating many Session entities in bulk.

func (*SessionCreateBulk) Exec

func (_c *SessionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionCreateBulk) ExecX

func (_c *SessionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionCreateBulk) OnConflict added in v1.12.0

func (_c *SessionCreateBulk) OnConflict(opts ...sql.ConflictOption) *SessionUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Session.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.SessionUpsert) {
		SetTitle(v+v).
	}).
	Exec(ctx)

func (*SessionCreateBulk) OnConflictColumns added in v1.12.0

func (_c *SessionCreateBulk) OnConflictColumns(columns ...string) *SessionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Session.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SessionCreateBulk) Save

func (_c *SessionCreateBulk) Save(ctx context.Context) ([]*Session, error)

Save creates the Session entities in the database.

func (*SessionCreateBulk) SaveX

func (_c *SessionCreateBulk) SaveX(ctx context.Context) []*Session

SaveX is like Save, but panics if an error occurs.

type SessionDelete

type SessionDelete struct {
	// contains filtered or unexported fields
}

SessionDelete is the builder for deleting a Session entity.

func (*SessionDelete) Exec

func (_d *SessionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SessionDelete) ExecX

func (_d *SessionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SessionDelete) Where

func (_d *SessionDelete) Where(ps ...predicate.Session) *SessionDelete

Where appends a list predicates to the SessionDelete builder.

type SessionDeleteOne

type SessionDeleteOne struct {
	// contains filtered or unexported fields
}

SessionDeleteOne is the builder for deleting a single Session entity.

func (*SessionDeleteOne) Exec

func (_d *SessionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SessionDeleteOne) ExecX

func (_d *SessionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionDeleteOne) Where

Where appends a list predicates to the SessionDelete builder.

type SessionEdges

type SessionEdges struct {
	// Worktree holds the value of the worktree edge.
	Worktree *Worktree `json:"worktree,omitempty"`
	// DiffStats holds the value of the diff_stats edge.
	DiffStats *DiffStats `json:"diff_stats,omitempty"`
	// Tags holds the value of the tags edge.
	Tags []*Tag `json:"tags,omitempty"`
	// ClaudeSession holds the value of the claude_session edge.
	ClaudeSession *ClaudeSession `json:"claude_session,omitempty"`
	// contains filtered or unexported fields
}

SessionEdges holds the relations/edges for other nodes in the graph.

func (SessionEdges) ClaudeSessionOrErr

func (e SessionEdges) ClaudeSessionOrErr() (*ClaudeSession, error)

ClaudeSessionOrErr returns the ClaudeSession value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SessionEdges) DiffStatsOrErr

func (e SessionEdges) DiffStatsOrErr() (*DiffStats, error)

DiffStatsOrErr returns the DiffStats value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SessionEdges) TagsOrErr

func (e SessionEdges) TagsOrErr() ([]*Tag, error)

TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.

func (SessionEdges) WorktreeOrErr

func (e SessionEdges) WorktreeOrErr() (*Worktree, error)

WorktreeOrErr returns the Worktree value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SessionGroupBy

type SessionGroupBy struct {
	// contains filtered or unexported fields
}

SessionGroupBy is the group-by builder for Session entities.

func (*SessionGroupBy) Aggregate

func (_g *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SessionGroupBy) Bool

func (s *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) BoolX

func (s *SessionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SessionGroupBy) Bools

func (s *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) BoolsX

func (s *SessionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SessionGroupBy) Float64

func (s *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) Float64X

func (s *SessionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SessionGroupBy) Float64s

func (s *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) Float64sX

func (s *SessionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SessionGroupBy) Int

func (s *SessionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) IntX

func (s *SessionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SessionGroupBy) Ints

func (s *SessionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) IntsX

func (s *SessionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SessionGroupBy) Scan

func (_g *SessionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SessionGroupBy) ScanX

func (s *SessionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SessionGroupBy) String

func (s *SessionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) StringX

func (s *SessionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SessionGroupBy) Strings

func (s *SessionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) StringsX

func (s *SessionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SessionMutation

type SessionMutation struct {
	// contains filtered or unexported fields
}

SessionMutation represents an operation that mutates the Session nodes in the graph.

func (*SessionMutation) AddField

func (m *SessionMutation) 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 (*SessionMutation) AddHeight

func (m *SessionMutation) AddHeight(i int)

AddHeight adds i to the "height" field.

func (*SessionMutation) AddStatus

func (m *SessionMutation) AddStatus(i int)

AddStatus adds i to the "status" field.

func (*SessionMutation) AddTagIDs

func (m *SessionMutation) AddTagIDs(ids ...int)

AddTagIDs adds the "tags" edge to the Tag entity by ids.

func (*SessionMutation) AddWidth

func (m *SessionMutation) AddWidth(i int)

AddWidth adds i to the "width" field.

func (*SessionMutation) AddedEdges

func (m *SessionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SessionMutation) AddedField

func (m *SessionMutation) 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 (*SessionMutation) AddedFields

func (m *SessionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SessionMutation) AddedHeight

func (m *SessionMutation) AddedHeight() (r int, exists bool)

AddedHeight returns the value that was added to the "height" field in this mutation.

func (*SessionMutation) AddedIDs

func (m *SessionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SessionMutation) AddedStatus

func (m *SessionMutation) AddedStatus() (r int, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*SessionMutation) AddedWidth

func (m *SessionMutation) AddedWidth() (r int, exists bool)

AddedWidth returns the value that was added to the "width" field in this mutation.

func (*SessionMutation) AutoYes

func (m *SessionMutation) AutoYes() (r bool, exists bool)

AutoYes returns the value of the "auto_yes" field in the mutation.

func (*SessionMutation) Branch

func (m *SessionMutation) Branch() (r string, exists bool)

Branch returns the value of the "branch" field in the mutation.

func (*SessionMutation) BranchCleared

func (m *SessionMutation) BranchCleared() bool

BranchCleared returns if the "branch" field was cleared in this mutation.

func (*SessionMutation) Category

func (m *SessionMutation) Category() (r string, exists bool)

Category returns the value of the "category" field in the mutation.

func (*SessionMutation) CategoryCleared

func (m *SessionMutation) CategoryCleared() bool

CategoryCleared returns if the "category" field was cleared in this mutation.

func (*SessionMutation) ClaudeSessionCleared

func (m *SessionMutation) ClaudeSessionCleared() bool

ClaudeSessionCleared reports if the "claude_session" edge to the ClaudeSession entity was cleared.

func (*SessionMutation) ClaudeSessionID

func (m *SessionMutation) ClaudeSessionID() (id int, exists bool)

ClaudeSessionID returns the "claude_session" edge ID in the mutation.

func (*SessionMutation) ClaudeSessionIDs

func (m *SessionMutation) ClaudeSessionIDs() (ids []int)

ClaudeSessionIDs returns the "claude_session" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ClaudeSessionID instead. It exists only for internal usage by the builders.

func (*SessionMutation) ClearBranch

func (m *SessionMutation) ClearBranch()

ClearBranch clears the value of the "branch" field.

func (*SessionMutation) ClearCategory

func (m *SessionMutation) ClearCategory()

ClearCategory clears the value of the "category" field.

func (*SessionMutation) ClearClaudeSession

func (m *SessionMutation) ClearClaudeSession()

ClearClaudeSession clears the "claude_session" edge to the ClaudeSession entity.

func (*SessionMutation) ClearDiffStats

func (m *SessionMutation) ClearDiffStats()

ClearDiffStats clears the "diff_stats" edge to the DiffStats entity.

func (*SessionMutation) ClearEdge

func (m *SessionMutation) 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 (*SessionMutation) ClearExistingWorktree

func (m *SessionMutation) ClearExistingWorktree()

ClearExistingWorktree clears the value of the "existing_worktree" field.

func (*SessionMutation) ClearField

func (m *SessionMutation) 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 (*SessionMutation) ClearHeight

func (m *SessionMutation) ClearHeight()

ClearHeight clears the value of the "height" field.

func (*SessionMutation) ClearLastAcknowledged

func (m *SessionMutation) ClearLastAcknowledged()

ClearLastAcknowledged clears the value of the "last_acknowledged" field.

func (*SessionMutation) ClearLastAddedToQueue

func (m *SessionMutation) ClearLastAddedToQueue()

ClearLastAddedToQueue clears the value of the "last_added_to_queue" field.

func (*SessionMutation) ClearLastMeaningfulOutput

func (m *SessionMutation) ClearLastMeaningfulOutput()

ClearLastMeaningfulOutput clears the value of the "last_meaningful_output" field.

func (*SessionMutation) ClearLastOutputSignature

func (m *SessionMutation) ClearLastOutputSignature()

ClearLastOutputSignature clears the value of the "last_output_signature" field.

func (*SessionMutation) ClearLastTerminalUpdate

func (m *SessionMutation) ClearLastTerminalUpdate()

ClearLastTerminalUpdate clears the value of the "last_terminal_update" field.

func (*SessionMutation) ClearLastViewed

func (m *SessionMutation) ClearLastViewed()

ClearLastViewed clears the value of the "last_viewed" field.

func (*SessionMutation) ClearPrompt

func (m *SessionMutation) ClearPrompt()

ClearPrompt clears the value of the "prompt" field.

func (*SessionMutation) ClearSessionType

func (m *SessionMutation) ClearSessionType()

ClearSessionType clears the value of the "session_type" field.

func (*SessionMutation) ClearTags

func (m *SessionMutation) ClearTags()

ClearTags clears the "tags" edge to the Tag entity.

func (*SessionMutation) ClearTmuxPrefix

func (m *SessionMutation) ClearTmuxPrefix()

ClearTmuxPrefix clears the value of the "tmux_prefix" field.

func (*SessionMutation) ClearWidth

func (m *SessionMutation) ClearWidth()

ClearWidth clears the value of the "width" field.

func (*SessionMutation) ClearWorkingDir

func (m *SessionMutation) ClearWorkingDir()

ClearWorkingDir clears the value of the "working_dir" field.

func (*SessionMutation) ClearWorktree

func (m *SessionMutation) ClearWorktree()

ClearWorktree clears the "worktree" edge to the Worktree entity.

func (*SessionMutation) ClearedEdges

func (m *SessionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SessionMutation) ClearedFields

func (m *SessionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SessionMutation) Client

func (m SessionMutation) 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 (*SessionMutation) CreatedAt

func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SessionMutation) DiffStatsCleared

func (m *SessionMutation) DiffStatsCleared() bool

DiffStatsCleared reports if the "diff_stats" edge to the DiffStats entity was cleared.

func (*SessionMutation) DiffStatsID

func (m *SessionMutation) DiffStatsID() (id int, exists bool)

DiffStatsID returns the "diff_stats" edge ID in the mutation.

func (*SessionMutation) DiffStatsIDs

func (m *SessionMutation) DiffStatsIDs() (ids []int)

DiffStatsIDs returns the "diff_stats" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DiffStatsID instead. It exists only for internal usage by the builders.

func (*SessionMutation) EdgeCleared

func (m *SessionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SessionMutation) ExistingWorktree

func (m *SessionMutation) ExistingWorktree() (r string, exists bool)

ExistingWorktree returns the value of the "existing_worktree" field in the mutation.

func (*SessionMutation) ExistingWorktreeCleared

func (m *SessionMutation) ExistingWorktreeCleared() bool

ExistingWorktreeCleared returns if the "existing_worktree" field was cleared in this mutation.

func (*SessionMutation) Field

func (m *SessionMutation) 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 (*SessionMutation) FieldCleared

func (m *SessionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SessionMutation) Fields

func (m *SessionMutation) 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 (*SessionMutation) Height

func (m *SessionMutation) Height() (r int, exists bool)

Height returns the value of the "height" field in the mutation.

func (*SessionMutation) HeightCleared

func (m *SessionMutation) HeightCleared() bool

HeightCleared returns if the "height" field was cleared in this mutation.

func (*SessionMutation) ID

func (m *SessionMutation) 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 (*SessionMutation) IDs

func (m *SessionMutation) 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 (*SessionMutation) IsExpanded

func (m *SessionMutation) IsExpanded() (r bool, exists bool)

IsExpanded returns the value of the "is_expanded" field in the mutation.

func (*SessionMutation) LastAcknowledged

func (m *SessionMutation) LastAcknowledged() (r time.Time, exists bool)

LastAcknowledged returns the value of the "last_acknowledged" field in the mutation.

func (*SessionMutation) LastAcknowledgedCleared

func (m *SessionMutation) LastAcknowledgedCleared() bool

LastAcknowledgedCleared returns if the "last_acknowledged" field was cleared in this mutation.

func (*SessionMutation) LastAddedToQueue

func (m *SessionMutation) LastAddedToQueue() (r time.Time, exists bool)

LastAddedToQueue returns the value of the "last_added_to_queue" field in the mutation.

func (*SessionMutation) LastAddedToQueueCleared

func (m *SessionMutation) LastAddedToQueueCleared() bool

LastAddedToQueueCleared returns if the "last_added_to_queue" field was cleared in this mutation.

func (*SessionMutation) LastMeaningfulOutput

func (m *SessionMutation) LastMeaningfulOutput() (r time.Time, exists bool)

LastMeaningfulOutput returns the value of the "last_meaningful_output" field in the mutation.

func (*SessionMutation) LastMeaningfulOutputCleared

func (m *SessionMutation) LastMeaningfulOutputCleared() bool

LastMeaningfulOutputCleared returns if the "last_meaningful_output" field was cleared in this mutation.

func (*SessionMutation) LastOutputSignature

func (m *SessionMutation) LastOutputSignature() (r string, exists bool)

LastOutputSignature returns the value of the "last_output_signature" field in the mutation.

func (*SessionMutation) LastOutputSignatureCleared

func (m *SessionMutation) LastOutputSignatureCleared() bool

LastOutputSignatureCleared returns if the "last_output_signature" field was cleared in this mutation.

func (*SessionMutation) LastTerminalUpdate

func (m *SessionMutation) LastTerminalUpdate() (r time.Time, exists bool)

LastTerminalUpdate returns the value of the "last_terminal_update" field in the mutation.

func (*SessionMutation) LastTerminalUpdateCleared

func (m *SessionMutation) LastTerminalUpdateCleared() bool

LastTerminalUpdateCleared returns if the "last_terminal_update" field was cleared in this mutation.

func (*SessionMutation) LastViewed

func (m *SessionMutation) LastViewed() (r time.Time, exists bool)

LastViewed returns the value of the "last_viewed" field in the mutation.

func (*SessionMutation) LastViewedCleared

func (m *SessionMutation) LastViewedCleared() bool

LastViewedCleared returns if the "last_viewed" field was cleared in this mutation.

func (*SessionMutation) OldAutoYes

func (m *SessionMutation) OldAutoYes(ctx context.Context) (v bool, err error)

OldAutoYes returns the old "auto_yes" field's value of the Session entity. If the Session 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 (*SessionMutation) OldBranch

func (m *SessionMutation) OldBranch(ctx context.Context) (v string, err error)

OldBranch returns the old "branch" field's value of the Session entity. If the Session 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 (*SessionMutation) OldCategory

func (m *SessionMutation) OldCategory(ctx context.Context) (v string, err error)

OldCategory returns the old "category" field's value of the Session entity. If the Session 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 (*SessionMutation) OldCreatedAt

func (m *SessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Session entity. If the Session 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 (*SessionMutation) OldExistingWorktree

func (m *SessionMutation) OldExistingWorktree(ctx context.Context) (v string, err error)

OldExistingWorktree returns the old "existing_worktree" field's value of the Session entity. If the Session 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 (*SessionMutation) OldField

func (m *SessionMutation) 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 (*SessionMutation) OldHeight

func (m *SessionMutation) OldHeight(ctx context.Context) (v int, err error)

OldHeight returns the old "height" field's value of the Session entity. If the Session 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 (*SessionMutation) OldIsExpanded

func (m *SessionMutation) OldIsExpanded(ctx context.Context) (v bool, err error)

OldIsExpanded returns the old "is_expanded" field's value of the Session entity. If the Session 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 (*SessionMutation) OldLastAcknowledged

func (m *SessionMutation) OldLastAcknowledged(ctx context.Context) (v *time.Time, err error)

OldLastAcknowledged returns the old "last_acknowledged" field's value of the Session entity. If the Session 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 (*SessionMutation) OldLastAddedToQueue

func (m *SessionMutation) OldLastAddedToQueue(ctx context.Context) (v *time.Time, err error)

OldLastAddedToQueue returns the old "last_added_to_queue" field's value of the Session entity. If the Session 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 (*SessionMutation) OldLastMeaningfulOutput

func (m *SessionMutation) OldLastMeaningfulOutput(ctx context.Context) (v *time.Time, err error)

OldLastMeaningfulOutput returns the old "last_meaningful_output" field's value of the Session entity. If the Session 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 (*SessionMutation) OldLastOutputSignature

func (m *SessionMutation) OldLastOutputSignature(ctx context.Context) (v string, err error)

OldLastOutputSignature returns the old "last_output_signature" field's value of the Session entity. If the Session 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 (*SessionMutation) OldLastTerminalUpdate

func (m *SessionMutation) OldLastTerminalUpdate(ctx context.Context) (v *time.Time, err error)

OldLastTerminalUpdate returns the old "last_terminal_update" field's value of the Session entity. If the Session 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 (*SessionMutation) OldLastViewed

func (m *SessionMutation) OldLastViewed(ctx context.Context) (v *time.Time, err error)

OldLastViewed returns the old "last_viewed" field's value of the Session entity. If the Session 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 (*SessionMutation) OldPath

func (m *SessionMutation) OldPath(ctx context.Context) (v string, err error)

OldPath returns the old "path" field's value of the Session entity. If the Session 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 (*SessionMutation) OldProgram

func (m *SessionMutation) OldProgram(ctx context.Context) (v string, err error)

OldProgram returns the old "program" field's value of the Session entity. If the Session 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 (*SessionMutation) OldPrompt

func (m *SessionMutation) OldPrompt(ctx context.Context) (v string, err error)

OldPrompt returns the old "prompt" field's value of the Session entity. If the Session 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 (*SessionMutation) OldSessionType

func (m *SessionMutation) OldSessionType(ctx context.Context) (v string, err error)

OldSessionType returns the old "session_type" field's value of the Session entity. If the Session 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 (*SessionMutation) OldStatus

func (m *SessionMutation) OldStatus(ctx context.Context) (v int, err error)

OldStatus returns the old "status" field's value of the Session entity. If the Session 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 (*SessionMutation) OldTitle

func (m *SessionMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Session entity. If the Session 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 (*SessionMutation) OldTmuxPrefix

func (m *SessionMutation) OldTmuxPrefix(ctx context.Context) (v string, err error)

OldTmuxPrefix returns the old "tmux_prefix" field's value of the Session entity. If the Session 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 (*SessionMutation) OldUpdatedAt

func (m *SessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Session entity. If the Session 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 (*SessionMutation) OldWidth

func (m *SessionMutation) OldWidth(ctx context.Context) (v int, err error)

OldWidth returns the old "width" field's value of the Session entity. If the Session 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 (*SessionMutation) OldWorkingDir

func (m *SessionMutation) OldWorkingDir(ctx context.Context) (v string, err error)

OldWorkingDir returns the old "working_dir" field's value of the Session entity. If the Session 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 (*SessionMutation) Op

func (m *SessionMutation) Op() Op

Op returns the operation name.

func (*SessionMutation) Path

func (m *SessionMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*SessionMutation) Program

func (m *SessionMutation) Program() (r string, exists bool)

Program returns the value of the "program" field in the mutation.

func (*SessionMutation) Prompt

func (m *SessionMutation) Prompt() (r string, exists bool)

Prompt returns the value of the "prompt" field in the mutation.

func (*SessionMutation) PromptCleared

func (m *SessionMutation) PromptCleared() bool

PromptCleared returns if the "prompt" field was cleared in this mutation.

func (*SessionMutation) RemoveTagIDs

func (m *SessionMutation) RemoveTagIDs(ids ...int)

RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.

func (*SessionMutation) RemovedEdges

func (m *SessionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SessionMutation) RemovedIDs

func (m *SessionMutation) 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 (*SessionMutation) RemovedTagsIDs

func (m *SessionMutation) RemovedTagsIDs() (ids []int)

RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.

func (*SessionMutation) ResetAutoYes

func (m *SessionMutation) ResetAutoYes()

ResetAutoYes resets all changes to the "auto_yes" field.

func (*SessionMutation) ResetBranch

func (m *SessionMutation) ResetBranch()

ResetBranch resets all changes to the "branch" field.

func (*SessionMutation) ResetCategory

func (m *SessionMutation) ResetCategory()

ResetCategory resets all changes to the "category" field.

func (*SessionMutation) ResetClaudeSession

func (m *SessionMutation) ResetClaudeSession()

ResetClaudeSession resets all changes to the "claude_session" edge.

func (*SessionMutation) ResetCreatedAt

func (m *SessionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SessionMutation) ResetDiffStats

func (m *SessionMutation) ResetDiffStats()

ResetDiffStats resets all changes to the "diff_stats" edge.

func (*SessionMutation) ResetEdge

func (m *SessionMutation) 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 (*SessionMutation) ResetExistingWorktree

func (m *SessionMutation) ResetExistingWorktree()

ResetExistingWorktree resets all changes to the "existing_worktree" field.

func (*SessionMutation) ResetField

func (m *SessionMutation) 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 (*SessionMutation) ResetHeight

func (m *SessionMutation) ResetHeight()

ResetHeight resets all changes to the "height" field.

func (*SessionMutation) ResetIsExpanded

func (m *SessionMutation) ResetIsExpanded()

ResetIsExpanded resets all changes to the "is_expanded" field.

func (*SessionMutation) ResetLastAcknowledged

func (m *SessionMutation) ResetLastAcknowledged()

ResetLastAcknowledged resets all changes to the "last_acknowledged" field.

func (*SessionMutation) ResetLastAddedToQueue

func (m *SessionMutation) ResetLastAddedToQueue()

ResetLastAddedToQueue resets all changes to the "last_added_to_queue" field.

func (*SessionMutation) ResetLastMeaningfulOutput

func (m *SessionMutation) ResetLastMeaningfulOutput()

ResetLastMeaningfulOutput resets all changes to the "last_meaningful_output" field.

func (*SessionMutation) ResetLastOutputSignature

func (m *SessionMutation) ResetLastOutputSignature()

ResetLastOutputSignature resets all changes to the "last_output_signature" field.

func (*SessionMutation) ResetLastTerminalUpdate

func (m *SessionMutation) ResetLastTerminalUpdate()

ResetLastTerminalUpdate resets all changes to the "last_terminal_update" field.

func (*SessionMutation) ResetLastViewed

func (m *SessionMutation) ResetLastViewed()

ResetLastViewed resets all changes to the "last_viewed" field.

func (*SessionMutation) ResetPath

func (m *SessionMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*SessionMutation) ResetProgram

func (m *SessionMutation) ResetProgram()

ResetProgram resets all changes to the "program" field.

func (*SessionMutation) ResetPrompt

func (m *SessionMutation) ResetPrompt()

ResetPrompt resets all changes to the "prompt" field.

func (*SessionMutation) ResetSessionType

func (m *SessionMutation) ResetSessionType()

ResetSessionType resets all changes to the "session_type" field.

func (*SessionMutation) ResetStatus

func (m *SessionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SessionMutation) ResetTags

func (m *SessionMutation) ResetTags()

ResetTags resets all changes to the "tags" edge.

func (*SessionMutation) ResetTitle

func (m *SessionMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*SessionMutation) ResetTmuxPrefix

func (m *SessionMutation) ResetTmuxPrefix()

ResetTmuxPrefix resets all changes to the "tmux_prefix" field.

func (*SessionMutation) ResetUpdatedAt

func (m *SessionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SessionMutation) ResetWidth

func (m *SessionMutation) ResetWidth()

ResetWidth resets all changes to the "width" field.

func (*SessionMutation) ResetWorkingDir

func (m *SessionMutation) ResetWorkingDir()

ResetWorkingDir resets all changes to the "working_dir" field.

func (*SessionMutation) ResetWorktree

func (m *SessionMutation) ResetWorktree()

ResetWorktree resets all changes to the "worktree" edge.

func (*SessionMutation) SessionType

func (m *SessionMutation) SessionType() (r string, exists bool)

SessionType returns the value of the "session_type" field in the mutation.

func (*SessionMutation) SessionTypeCleared

func (m *SessionMutation) SessionTypeCleared() bool

SessionTypeCleared returns if the "session_type" field was cleared in this mutation.

func (*SessionMutation) SetAutoYes

func (m *SessionMutation) SetAutoYes(b bool)

SetAutoYes sets the "auto_yes" field.

func (*SessionMutation) SetBranch

func (m *SessionMutation) SetBranch(s string)

SetBranch sets the "branch" field.

func (*SessionMutation) SetCategory

func (m *SessionMutation) SetCategory(s string)

SetCategory sets the "category" field.

func (*SessionMutation) SetClaudeSessionID

func (m *SessionMutation) SetClaudeSessionID(id int)

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by id.

func (*SessionMutation) SetCreatedAt

func (m *SessionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SessionMutation) SetDiffStatsID

func (m *SessionMutation) SetDiffStatsID(id int)

SetDiffStatsID sets the "diff_stats" edge to the DiffStats entity by id.

func (*SessionMutation) SetExistingWorktree

func (m *SessionMutation) SetExistingWorktree(s string)

SetExistingWorktree sets the "existing_worktree" field.

func (*SessionMutation) SetField

func (m *SessionMutation) 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 (*SessionMutation) SetHeight

func (m *SessionMutation) SetHeight(i int)

SetHeight sets the "height" field.

func (*SessionMutation) SetIsExpanded

func (m *SessionMutation) SetIsExpanded(b bool)

SetIsExpanded sets the "is_expanded" field.

func (*SessionMutation) SetLastAcknowledged

func (m *SessionMutation) SetLastAcknowledged(t time.Time)

SetLastAcknowledged sets the "last_acknowledged" field.

func (*SessionMutation) SetLastAddedToQueue

func (m *SessionMutation) SetLastAddedToQueue(t time.Time)

SetLastAddedToQueue sets the "last_added_to_queue" field.

func (*SessionMutation) SetLastMeaningfulOutput

func (m *SessionMutation) SetLastMeaningfulOutput(t time.Time)

SetLastMeaningfulOutput sets the "last_meaningful_output" field.

func (*SessionMutation) SetLastOutputSignature

func (m *SessionMutation) SetLastOutputSignature(s string)

SetLastOutputSignature sets the "last_output_signature" field.

func (*SessionMutation) SetLastTerminalUpdate

func (m *SessionMutation) SetLastTerminalUpdate(t time.Time)

SetLastTerminalUpdate sets the "last_terminal_update" field.

func (*SessionMutation) SetLastViewed

func (m *SessionMutation) SetLastViewed(t time.Time)

SetLastViewed sets the "last_viewed" field.

func (*SessionMutation) SetOp

func (m *SessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SessionMutation) SetPath

func (m *SessionMutation) SetPath(s string)

SetPath sets the "path" field.

func (*SessionMutation) SetProgram

func (m *SessionMutation) SetProgram(s string)

SetProgram sets the "program" field.

func (*SessionMutation) SetPrompt

func (m *SessionMutation) SetPrompt(s string)

SetPrompt sets the "prompt" field.

func (*SessionMutation) SetSessionType

func (m *SessionMutation) SetSessionType(s string)

SetSessionType sets the "session_type" field.

func (*SessionMutation) SetStatus

func (m *SessionMutation) SetStatus(i int)

SetStatus sets the "status" field.

func (*SessionMutation) SetTitle

func (m *SessionMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*SessionMutation) SetTmuxPrefix

func (m *SessionMutation) SetTmuxPrefix(s string)

SetTmuxPrefix sets the "tmux_prefix" field.

func (*SessionMutation) SetUpdatedAt

func (m *SessionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SessionMutation) SetWidth

func (m *SessionMutation) SetWidth(i int)

SetWidth sets the "width" field.

func (*SessionMutation) SetWorkingDir

func (m *SessionMutation) SetWorkingDir(s string)

SetWorkingDir sets the "working_dir" field.

func (*SessionMutation) SetWorktreeID

func (m *SessionMutation) SetWorktreeID(id int)

SetWorktreeID sets the "worktree" edge to the Worktree entity by id.

func (*SessionMutation) Status

func (m *SessionMutation) Status() (r int, exists bool)

Status returns the value of the "status" field in the mutation.

func (*SessionMutation) TagsCleared

func (m *SessionMutation) TagsCleared() bool

TagsCleared reports if the "tags" edge to the Tag entity was cleared.

func (*SessionMutation) TagsIDs

func (m *SessionMutation) TagsIDs() (ids []int)

TagsIDs returns the "tags" edge IDs in the mutation.

func (*SessionMutation) Title

func (m *SessionMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (*SessionMutation) TmuxPrefix

func (m *SessionMutation) TmuxPrefix() (r string, exists bool)

TmuxPrefix returns the value of the "tmux_prefix" field in the mutation.

func (*SessionMutation) TmuxPrefixCleared

func (m *SessionMutation) TmuxPrefixCleared() bool

TmuxPrefixCleared returns if the "tmux_prefix" field was cleared in this mutation.

func (SessionMutation) Tx

func (m SessionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SessionMutation) Type

func (m *SessionMutation) Type() string

Type returns the node type of this mutation (Session).

func (*SessionMutation) UpdatedAt

func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SessionMutation) Where

func (m *SessionMutation) Where(ps ...predicate.Session)

Where appends a list predicates to the SessionMutation builder.

func (*SessionMutation) WhereP

func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*SessionMutation) Width

func (m *SessionMutation) Width() (r int, exists bool)

Width returns the value of the "width" field in the mutation.

func (*SessionMutation) WidthCleared

func (m *SessionMutation) WidthCleared() bool

WidthCleared returns if the "width" field was cleared in this mutation.

func (*SessionMutation) WorkingDir

func (m *SessionMutation) WorkingDir() (r string, exists bool)

WorkingDir returns the value of the "working_dir" field in the mutation.

func (*SessionMutation) WorkingDirCleared

func (m *SessionMutation) WorkingDirCleared() bool

WorkingDirCleared returns if the "working_dir" field was cleared in this mutation.

func (*SessionMutation) WorktreeCleared

func (m *SessionMutation) WorktreeCleared() bool

WorktreeCleared reports if the "worktree" edge to the Worktree entity was cleared.

func (*SessionMutation) WorktreeID

func (m *SessionMutation) WorktreeID() (id int, exists bool)

WorktreeID returns the "worktree" edge ID in the mutation.

func (*SessionMutation) WorktreeIDs

func (m *SessionMutation) WorktreeIDs() (ids []int)

WorktreeIDs returns the "worktree" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorktreeID instead. It exists only for internal usage by the builders.

type SessionQuery

type SessionQuery struct {
	// contains filtered or unexported fields
}

SessionQuery is the builder for querying Session entities.

func (*SessionQuery) Aggregate

func (_q *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect

Aggregate returns a SessionSelect configured with the given aggregations.

func (*SessionQuery) All

func (_q *SessionQuery) All(ctx context.Context) ([]*Session, error)

All executes the query and returns a list of Sessions.

func (*SessionQuery) AllX

func (_q *SessionQuery) AllX(ctx context.Context) []*Session

AllX is like All, but panics if an error occurs.

func (*SessionQuery) Clone

func (_q *SessionQuery) Clone() *SessionQuery

Clone returns a duplicate of the SessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SessionQuery) Count

func (_q *SessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SessionQuery) CountX

func (_q *SessionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SessionQuery) Exist

func (_q *SessionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SessionQuery) ExistX

func (_q *SessionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SessionQuery) First

func (_q *SessionQuery) First(ctx context.Context) (*Session, error)

First returns the first Session entity from the query. Returns a *NotFoundError when no Session was found.

func (*SessionQuery) FirstID

func (_q *SessionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Session ID from the query. Returns a *NotFoundError when no Session ID was found.

func (*SessionQuery) FirstIDX

func (_q *SessionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SessionQuery) FirstX

func (_q *SessionQuery) FirstX(ctx context.Context) *Session

FirstX is like First, but panics if an error occurs.

func (*SessionQuery) GroupBy

func (_q *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy

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 {
	Title string `json:"title,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Session.Query().
	GroupBy(session.FieldTitle).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SessionQuery) IDs

func (_q *SessionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Session IDs.

func (*SessionQuery) IDsX

func (_q *SessionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SessionQuery) Limit

func (_q *SessionQuery) Limit(limit int) *SessionQuery

Limit the number of records to be returned by this query.

func (*SessionQuery) Offset

func (_q *SessionQuery) Offset(offset int) *SessionQuery

Offset to start from.

func (*SessionQuery) Only

func (_q *SessionQuery) Only(ctx context.Context) (*Session, error)

Only returns a single Session entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Session entity is found. Returns a *NotFoundError when no Session entities are found.

func (*SessionQuery) OnlyID

func (_q *SessionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Session ID in the query. Returns a *NotSingularError when more than one Session ID is found. Returns a *NotFoundError when no entities are found.

func (*SessionQuery) OnlyIDX

func (_q *SessionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SessionQuery) OnlyX

func (_q *SessionQuery) OnlyX(ctx context.Context) *Session

OnlyX is like Only, but panics if an error occurs.

func (*SessionQuery) Order

func (_q *SessionQuery) Order(o ...session.OrderOption) *SessionQuery

Order specifies how the records should be ordered.

func (*SessionQuery) QueryClaudeSession

func (_q *SessionQuery) QueryClaudeSession() *ClaudeSessionQuery

QueryClaudeSession chains the current query on the "claude_session" edge.

func (*SessionQuery) QueryDiffStats

func (_q *SessionQuery) QueryDiffStats() *DiffStatsQuery

QueryDiffStats chains the current query on the "diff_stats" edge.

func (*SessionQuery) QueryTags

func (_q *SessionQuery) QueryTags() *TagQuery

QueryTags chains the current query on the "tags" edge.

func (*SessionQuery) QueryWorktree

func (_q *SessionQuery) QueryWorktree() *WorktreeQuery

QueryWorktree chains the current query on the "worktree" edge.

func (*SessionQuery) Select

func (_q *SessionQuery) Select(fields ...string) *SessionSelect

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 {
	Title string `json:"title,omitempty"`
}

client.Session.Query().
	Select(session.FieldTitle).
	Scan(ctx, &v)

func (*SessionQuery) Unique

func (_q *SessionQuery) Unique(unique bool) *SessionQuery

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 (*SessionQuery) Where

func (_q *SessionQuery) Where(ps ...predicate.Session) *SessionQuery

Where adds a new predicate for the SessionQuery builder.

func (*SessionQuery) WithClaudeSession

func (_q *SessionQuery) WithClaudeSession(opts ...func(*ClaudeSessionQuery)) *SessionQuery

WithClaudeSession tells the query-builder to eager-load the nodes that are connected to the "claude_session" edge. The optional arguments are used to configure the query builder of the edge.

func (*SessionQuery) WithDiffStats

func (_q *SessionQuery) WithDiffStats(opts ...func(*DiffStatsQuery)) *SessionQuery

WithDiffStats tells the query-builder to eager-load the nodes that are connected to the "diff_stats" edge. The optional arguments are used to configure the query builder of the edge.

func (*SessionQuery) WithTags

func (_q *SessionQuery) WithTags(opts ...func(*TagQuery)) *SessionQuery

WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.

func (*SessionQuery) WithWorktree

func (_q *SessionQuery) WithWorktree(opts ...func(*WorktreeQuery)) *SessionQuery

WithWorktree tells the query-builder to eager-load the nodes that are connected to the "worktree" edge. The optional arguments are used to configure the query builder of the edge.

type SessionSelect

type SessionSelect struct {
	*SessionQuery
	// contains filtered or unexported fields
}

SessionSelect is the builder for selecting fields of Session entities.

func (*SessionSelect) Aggregate

func (_s *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SessionSelect) Bool

func (s *SessionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SessionSelect) BoolX

func (s *SessionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SessionSelect) Bools

func (s *SessionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SessionSelect) BoolsX

func (s *SessionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SessionSelect) Float64

func (s *SessionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SessionSelect) Float64X

func (s *SessionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SessionSelect) Float64s

func (s *SessionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SessionSelect) Float64sX

func (s *SessionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SessionSelect) Int

func (s *SessionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SessionSelect) IntX

func (s *SessionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SessionSelect) Ints

func (s *SessionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SessionSelect) IntsX

func (s *SessionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SessionSelect) Scan

func (_s *SessionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SessionSelect) ScanX

func (s *SessionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SessionSelect) String

func (s *SessionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SessionSelect) StringX

func (s *SessionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SessionSelect) Strings

func (s *SessionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SessionSelect) StringsX

func (s *SessionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SessionUpdate

type SessionUpdate struct {
	// contains filtered or unexported fields
}

SessionUpdate is the builder for updating Session entities.

func (*SessionUpdate) AddHeight

func (_u *SessionUpdate) AddHeight(v int) *SessionUpdate

AddHeight adds value to the "height" field.

func (*SessionUpdate) AddStatus

func (_u *SessionUpdate) AddStatus(v int) *SessionUpdate

AddStatus adds value to the "status" field.

func (*SessionUpdate) AddTagIDs

func (_u *SessionUpdate) AddTagIDs(ids ...int) *SessionUpdate

AddTagIDs adds the "tags" edge to the Tag entity by IDs.

func (*SessionUpdate) AddTags

func (_u *SessionUpdate) AddTags(v ...*Tag) *SessionUpdate

AddTags adds the "tags" edges to the Tag entity.

func (*SessionUpdate) AddWidth

func (_u *SessionUpdate) AddWidth(v int) *SessionUpdate

AddWidth adds value to the "width" field.

func (*SessionUpdate) ClearBranch

func (_u *SessionUpdate) ClearBranch() *SessionUpdate

ClearBranch clears the value of the "branch" field.

func (*SessionUpdate) ClearCategory

func (_u *SessionUpdate) ClearCategory() *SessionUpdate

ClearCategory clears the value of the "category" field.

func (*SessionUpdate) ClearClaudeSession

func (_u *SessionUpdate) ClearClaudeSession() *SessionUpdate

ClearClaudeSession clears the "claude_session" edge to the ClaudeSession entity.

func (*SessionUpdate) ClearDiffStats

func (_u *SessionUpdate) ClearDiffStats() *SessionUpdate

ClearDiffStats clears the "diff_stats" edge to the DiffStats entity.

func (*SessionUpdate) ClearExistingWorktree

func (_u *SessionUpdate) ClearExistingWorktree() *SessionUpdate

ClearExistingWorktree clears the value of the "existing_worktree" field.

func (*SessionUpdate) ClearHeight

func (_u *SessionUpdate) ClearHeight() *SessionUpdate

ClearHeight clears the value of the "height" field.

func (*SessionUpdate) ClearLastAcknowledged

func (_u *SessionUpdate) ClearLastAcknowledged() *SessionUpdate

ClearLastAcknowledged clears the value of the "last_acknowledged" field.

func (*SessionUpdate) ClearLastAddedToQueue

func (_u *SessionUpdate) ClearLastAddedToQueue() *SessionUpdate

ClearLastAddedToQueue clears the value of the "last_added_to_queue" field.

func (*SessionUpdate) ClearLastMeaningfulOutput

func (_u *SessionUpdate) ClearLastMeaningfulOutput() *SessionUpdate

ClearLastMeaningfulOutput clears the value of the "last_meaningful_output" field.

func (*SessionUpdate) ClearLastOutputSignature

func (_u *SessionUpdate) ClearLastOutputSignature() *SessionUpdate

ClearLastOutputSignature clears the value of the "last_output_signature" field.

func (*SessionUpdate) ClearLastTerminalUpdate

func (_u *SessionUpdate) ClearLastTerminalUpdate() *SessionUpdate

ClearLastTerminalUpdate clears the value of the "last_terminal_update" field.

func (*SessionUpdate) ClearLastViewed

func (_u *SessionUpdate) ClearLastViewed() *SessionUpdate

ClearLastViewed clears the value of the "last_viewed" field.

func (*SessionUpdate) ClearPrompt

func (_u *SessionUpdate) ClearPrompt() *SessionUpdate

ClearPrompt clears the value of the "prompt" field.

func (*SessionUpdate) ClearSessionType

func (_u *SessionUpdate) ClearSessionType() *SessionUpdate

ClearSessionType clears the value of the "session_type" field.

func (*SessionUpdate) ClearTags

func (_u *SessionUpdate) ClearTags() *SessionUpdate

ClearTags clears all "tags" edges to the Tag entity.

func (*SessionUpdate) ClearTmuxPrefix

func (_u *SessionUpdate) ClearTmuxPrefix() *SessionUpdate

ClearTmuxPrefix clears the value of the "tmux_prefix" field.

func (*SessionUpdate) ClearWidth

func (_u *SessionUpdate) ClearWidth() *SessionUpdate

ClearWidth clears the value of the "width" field.

func (*SessionUpdate) ClearWorkingDir

func (_u *SessionUpdate) ClearWorkingDir() *SessionUpdate

ClearWorkingDir clears the value of the "working_dir" field.

func (*SessionUpdate) ClearWorktree

func (_u *SessionUpdate) ClearWorktree() *SessionUpdate

ClearWorktree clears the "worktree" edge to the Worktree entity.

func (*SessionUpdate) Exec

func (_u *SessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionUpdate) ExecX

func (_u *SessionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionUpdate) Mutation

func (_u *SessionUpdate) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionUpdate) RemoveTagIDs

func (_u *SessionUpdate) RemoveTagIDs(ids ...int) *SessionUpdate

RemoveTagIDs removes the "tags" edge to Tag entities by IDs.

func (*SessionUpdate) RemoveTags

func (_u *SessionUpdate) RemoveTags(v ...*Tag) *SessionUpdate

RemoveTags removes "tags" edges to Tag entities.

func (*SessionUpdate) Save

func (_u *SessionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SessionUpdate) SaveX

func (_u *SessionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SessionUpdate) SetAutoYes

func (_u *SessionUpdate) SetAutoYes(v bool) *SessionUpdate

SetAutoYes sets the "auto_yes" field.

func (*SessionUpdate) SetBranch

func (_u *SessionUpdate) SetBranch(v string) *SessionUpdate

SetBranch sets the "branch" field.

func (*SessionUpdate) SetCategory

func (_u *SessionUpdate) SetCategory(v string) *SessionUpdate

SetCategory sets the "category" field.

func (*SessionUpdate) SetClaudeSession

func (_u *SessionUpdate) SetClaudeSession(v *ClaudeSession) *SessionUpdate

SetClaudeSession sets the "claude_session" edge to the ClaudeSession entity.

func (*SessionUpdate) SetClaudeSessionID

func (_u *SessionUpdate) SetClaudeSessionID(id int) *SessionUpdate

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID.

func (*SessionUpdate) SetDiffStats

func (_u *SessionUpdate) SetDiffStats(v *DiffStats) *SessionUpdate

SetDiffStats sets the "diff_stats" edge to the DiffStats entity.

func (*SessionUpdate) SetDiffStatsID

func (_u *SessionUpdate) SetDiffStatsID(id int) *SessionUpdate

SetDiffStatsID sets the "diff_stats" edge to the DiffStats entity by ID.

func (*SessionUpdate) SetExistingWorktree

func (_u *SessionUpdate) SetExistingWorktree(v string) *SessionUpdate

SetExistingWorktree sets the "existing_worktree" field.

func (*SessionUpdate) SetHeight

func (_u *SessionUpdate) SetHeight(v int) *SessionUpdate

SetHeight sets the "height" field.

func (*SessionUpdate) SetIsExpanded

func (_u *SessionUpdate) SetIsExpanded(v bool) *SessionUpdate

SetIsExpanded sets the "is_expanded" field.

func (*SessionUpdate) SetLastAcknowledged

func (_u *SessionUpdate) SetLastAcknowledged(v time.Time) *SessionUpdate

SetLastAcknowledged sets the "last_acknowledged" field.

func (*SessionUpdate) SetLastAddedToQueue

func (_u *SessionUpdate) SetLastAddedToQueue(v time.Time) *SessionUpdate

SetLastAddedToQueue sets the "last_added_to_queue" field.

func (*SessionUpdate) SetLastMeaningfulOutput

func (_u *SessionUpdate) SetLastMeaningfulOutput(v time.Time) *SessionUpdate

SetLastMeaningfulOutput sets the "last_meaningful_output" field.

func (*SessionUpdate) SetLastOutputSignature

func (_u *SessionUpdate) SetLastOutputSignature(v string) *SessionUpdate

SetLastOutputSignature sets the "last_output_signature" field.

func (*SessionUpdate) SetLastTerminalUpdate

func (_u *SessionUpdate) SetLastTerminalUpdate(v time.Time) *SessionUpdate

SetLastTerminalUpdate sets the "last_terminal_update" field.

func (*SessionUpdate) SetLastViewed

func (_u *SessionUpdate) SetLastViewed(v time.Time) *SessionUpdate

SetLastViewed sets the "last_viewed" field.

func (*SessionUpdate) SetNillableAutoYes

func (_u *SessionUpdate) SetNillableAutoYes(v *bool) *SessionUpdate

SetNillableAutoYes sets the "auto_yes" field if the given value is not nil.

func (*SessionUpdate) SetNillableBranch

func (_u *SessionUpdate) SetNillableBranch(v *string) *SessionUpdate

SetNillableBranch sets the "branch" field if the given value is not nil.

func (*SessionUpdate) SetNillableCategory

func (_u *SessionUpdate) SetNillableCategory(v *string) *SessionUpdate

SetNillableCategory sets the "category" field if the given value is not nil.

func (*SessionUpdate) SetNillableClaudeSessionID

func (_u *SessionUpdate) SetNillableClaudeSessionID(id *int) *SessionUpdate

SetNillableClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID if the given value is not nil.

func (*SessionUpdate) SetNillableDiffStatsID

func (_u *SessionUpdate) SetNillableDiffStatsID(id *int) *SessionUpdate

SetNillableDiffStatsID sets the "diff_stats" edge to the DiffStats entity by ID if the given value is not nil.

func (*SessionUpdate) SetNillableExistingWorktree

func (_u *SessionUpdate) SetNillableExistingWorktree(v *string) *SessionUpdate

SetNillableExistingWorktree sets the "existing_worktree" field if the given value is not nil.

func (*SessionUpdate) SetNillableHeight

func (_u *SessionUpdate) SetNillableHeight(v *int) *SessionUpdate

SetNillableHeight sets the "height" field if the given value is not nil.

func (*SessionUpdate) SetNillableIsExpanded

func (_u *SessionUpdate) SetNillableIsExpanded(v *bool) *SessionUpdate

SetNillableIsExpanded sets the "is_expanded" field if the given value is not nil.

func (*SessionUpdate) SetNillableLastAcknowledged

func (_u *SessionUpdate) SetNillableLastAcknowledged(v *time.Time) *SessionUpdate

SetNillableLastAcknowledged sets the "last_acknowledged" field if the given value is not nil.

func (*SessionUpdate) SetNillableLastAddedToQueue

func (_u *SessionUpdate) SetNillableLastAddedToQueue(v *time.Time) *SessionUpdate

SetNillableLastAddedToQueue sets the "last_added_to_queue" field if the given value is not nil.

func (*SessionUpdate) SetNillableLastMeaningfulOutput

func (_u *SessionUpdate) SetNillableLastMeaningfulOutput(v *time.Time) *SessionUpdate

SetNillableLastMeaningfulOutput sets the "last_meaningful_output" field if the given value is not nil.

func (*SessionUpdate) SetNillableLastOutputSignature

func (_u *SessionUpdate) SetNillableLastOutputSignature(v *string) *SessionUpdate

SetNillableLastOutputSignature sets the "last_output_signature" field if the given value is not nil.

func (*SessionUpdate) SetNillableLastTerminalUpdate

func (_u *SessionUpdate) SetNillableLastTerminalUpdate(v *time.Time) *SessionUpdate

SetNillableLastTerminalUpdate sets the "last_terminal_update" field if the given value is not nil.

func (*SessionUpdate) SetNillableLastViewed

func (_u *SessionUpdate) SetNillableLastViewed(v *time.Time) *SessionUpdate

SetNillableLastViewed sets the "last_viewed" field if the given value is not nil.

func (*SessionUpdate) SetNillablePath

func (_u *SessionUpdate) SetNillablePath(v *string) *SessionUpdate

SetNillablePath sets the "path" field if the given value is not nil.

func (*SessionUpdate) SetNillableProgram

func (_u *SessionUpdate) SetNillableProgram(v *string) *SessionUpdate

SetNillableProgram sets the "program" field if the given value is not nil.

func (*SessionUpdate) SetNillablePrompt

func (_u *SessionUpdate) SetNillablePrompt(v *string) *SessionUpdate

SetNillablePrompt sets the "prompt" field if the given value is not nil.

func (*SessionUpdate) SetNillableSessionType

func (_u *SessionUpdate) SetNillableSessionType(v *string) *SessionUpdate

SetNillableSessionType sets the "session_type" field if the given value is not nil.

func (*SessionUpdate) SetNillableStatus

func (_u *SessionUpdate) SetNillableStatus(v *int) *SessionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SessionUpdate) SetNillableTitle

func (_u *SessionUpdate) SetNillableTitle(v *string) *SessionUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*SessionUpdate) SetNillableTmuxPrefix

func (_u *SessionUpdate) SetNillableTmuxPrefix(v *string) *SessionUpdate

SetNillableTmuxPrefix sets the "tmux_prefix" field if the given value is not nil.

func (*SessionUpdate) SetNillableWidth

func (_u *SessionUpdate) SetNillableWidth(v *int) *SessionUpdate

SetNillableWidth sets the "width" field if the given value is not nil.

func (*SessionUpdate) SetNillableWorkingDir

func (_u *SessionUpdate) SetNillableWorkingDir(v *string) *SessionUpdate

SetNillableWorkingDir sets the "working_dir" field if the given value is not nil.

func (*SessionUpdate) SetNillableWorktreeID

func (_u *SessionUpdate) SetNillableWorktreeID(id *int) *SessionUpdate

SetNillableWorktreeID sets the "worktree" edge to the Worktree entity by ID if the given value is not nil.

func (*SessionUpdate) SetPath

func (_u *SessionUpdate) SetPath(v string) *SessionUpdate

SetPath sets the "path" field.

func (*SessionUpdate) SetProgram

func (_u *SessionUpdate) SetProgram(v string) *SessionUpdate

SetProgram sets the "program" field.

func (*SessionUpdate) SetPrompt

func (_u *SessionUpdate) SetPrompt(v string) *SessionUpdate

SetPrompt sets the "prompt" field.

func (*SessionUpdate) SetSessionType

func (_u *SessionUpdate) SetSessionType(v string) *SessionUpdate

SetSessionType sets the "session_type" field.

func (*SessionUpdate) SetStatus

func (_u *SessionUpdate) SetStatus(v int) *SessionUpdate

SetStatus sets the "status" field.

func (*SessionUpdate) SetTitle

func (_u *SessionUpdate) SetTitle(v string) *SessionUpdate

SetTitle sets the "title" field.

func (*SessionUpdate) SetTmuxPrefix

func (_u *SessionUpdate) SetTmuxPrefix(v string) *SessionUpdate

SetTmuxPrefix sets the "tmux_prefix" field.

func (*SessionUpdate) SetUpdatedAt

func (_u *SessionUpdate) SetUpdatedAt(v time.Time) *SessionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SessionUpdate) SetWidth

func (_u *SessionUpdate) SetWidth(v int) *SessionUpdate

SetWidth sets the "width" field.

func (*SessionUpdate) SetWorkingDir

func (_u *SessionUpdate) SetWorkingDir(v string) *SessionUpdate

SetWorkingDir sets the "working_dir" field.

func (*SessionUpdate) SetWorktree

func (_u *SessionUpdate) SetWorktree(v *Worktree) *SessionUpdate

SetWorktree sets the "worktree" edge to the Worktree entity.

func (*SessionUpdate) SetWorktreeID

func (_u *SessionUpdate) SetWorktreeID(id int) *SessionUpdate

SetWorktreeID sets the "worktree" edge to the Worktree entity by ID.

func (*SessionUpdate) Where

func (_u *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate

Where appends a list predicates to the SessionUpdate builder.

type SessionUpdateOne

type SessionUpdateOne struct {
	// contains filtered or unexported fields
}

SessionUpdateOne is the builder for updating a single Session entity.

func (*SessionUpdateOne) AddHeight

func (_u *SessionUpdateOne) AddHeight(v int) *SessionUpdateOne

AddHeight adds value to the "height" field.

func (*SessionUpdateOne) AddStatus

func (_u *SessionUpdateOne) AddStatus(v int) *SessionUpdateOne

AddStatus adds value to the "status" field.

func (*SessionUpdateOne) AddTagIDs

func (_u *SessionUpdateOne) AddTagIDs(ids ...int) *SessionUpdateOne

AddTagIDs adds the "tags" edge to the Tag entity by IDs.

func (*SessionUpdateOne) AddTags

func (_u *SessionUpdateOne) AddTags(v ...*Tag) *SessionUpdateOne

AddTags adds the "tags" edges to the Tag entity.

func (*SessionUpdateOne) AddWidth

func (_u *SessionUpdateOne) AddWidth(v int) *SessionUpdateOne

AddWidth adds value to the "width" field.

func (*SessionUpdateOne) ClearBranch

func (_u *SessionUpdateOne) ClearBranch() *SessionUpdateOne

ClearBranch clears the value of the "branch" field.

func (*SessionUpdateOne) ClearCategory

func (_u *SessionUpdateOne) ClearCategory() *SessionUpdateOne

ClearCategory clears the value of the "category" field.

func (*SessionUpdateOne) ClearClaudeSession

func (_u *SessionUpdateOne) ClearClaudeSession() *SessionUpdateOne

ClearClaudeSession clears the "claude_session" edge to the ClaudeSession entity.

func (*SessionUpdateOne) ClearDiffStats

func (_u *SessionUpdateOne) ClearDiffStats() *SessionUpdateOne

ClearDiffStats clears the "diff_stats" edge to the DiffStats entity.

func (*SessionUpdateOne) ClearExistingWorktree

func (_u *SessionUpdateOne) ClearExistingWorktree() *SessionUpdateOne

ClearExistingWorktree clears the value of the "existing_worktree" field.

func (*SessionUpdateOne) ClearHeight

func (_u *SessionUpdateOne) ClearHeight() *SessionUpdateOne

ClearHeight clears the value of the "height" field.

func (*SessionUpdateOne) ClearLastAcknowledged

func (_u *SessionUpdateOne) ClearLastAcknowledged() *SessionUpdateOne

ClearLastAcknowledged clears the value of the "last_acknowledged" field.

func (*SessionUpdateOne) ClearLastAddedToQueue

func (_u *SessionUpdateOne) ClearLastAddedToQueue() *SessionUpdateOne

ClearLastAddedToQueue clears the value of the "last_added_to_queue" field.

func (*SessionUpdateOne) ClearLastMeaningfulOutput

func (_u *SessionUpdateOne) ClearLastMeaningfulOutput() *SessionUpdateOne

ClearLastMeaningfulOutput clears the value of the "last_meaningful_output" field.

func (*SessionUpdateOne) ClearLastOutputSignature

func (_u *SessionUpdateOne) ClearLastOutputSignature() *SessionUpdateOne

ClearLastOutputSignature clears the value of the "last_output_signature" field.

func (*SessionUpdateOne) ClearLastTerminalUpdate

func (_u *SessionUpdateOne) ClearLastTerminalUpdate() *SessionUpdateOne

ClearLastTerminalUpdate clears the value of the "last_terminal_update" field.

func (*SessionUpdateOne) ClearLastViewed

func (_u *SessionUpdateOne) ClearLastViewed() *SessionUpdateOne

ClearLastViewed clears the value of the "last_viewed" field.

func (*SessionUpdateOne) ClearPrompt

func (_u *SessionUpdateOne) ClearPrompt() *SessionUpdateOne

ClearPrompt clears the value of the "prompt" field.

func (*SessionUpdateOne) ClearSessionType

func (_u *SessionUpdateOne) ClearSessionType() *SessionUpdateOne

ClearSessionType clears the value of the "session_type" field.

func (*SessionUpdateOne) ClearTags

func (_u *SessionUpdateOne) ClearTags() *SessionUpdateOne

ClearTags clears all "tags" edges to the Tag entity.

func (*SessionUpdateOne) ClearTmuxPrefix

func (_u *SessionUpdateOne) ClearTmuxPrefix() *SessionUpdateOne

ClearTmuxPrefix clears the value of the "tmux_prefix" field.

func (*SessionUpdateOne) ClearWidth

func (_u *SessionUpdateOne) ClearWidth() *SessionUpdateOne

ClearWidth clears the value of the "width" field.

func (*SessionUpdateOne) ClearWorkingDir

func (_u *SessionUpdateOne) ClearWorkingDir() *SessionUpdateOne

ClearWorkingDir clears the value of the "working_dir" field.

func (*SessionUpdateOne) ClearWorktree

func (_u *SessionUpdateOne) ClearWorktree() *SessionUpdateOne

ClearWorktree clears the "worktree" edge to the Worktree entity.

func (*SessionUpdateOne) Exec

func (_u *SessionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SessionUpdateOne) ExecX

func (_u *SessionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionUpdateOne) Mutation

func (_u *SessionUpdateOne) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionUpdateOne) RemoveTagIDs

func (_u *SessionUpdateOne) RemoveTagIDs(ids ...int) *SessionUpdateOne

RemoveTagIDs removes the "tags" edge to Tag entities by IDs.

func (*SessionUpdateOne) RemoveTags

func (_u *SessionUpdateOne) RemoveTags(v ...*Tag) *SessionUpdateOne

RemoveTags removes "tags" edges to Tag entities.

func (*SessionUpdateOne) Save

func (_u *SessionUpdateOne) Save(ctx context.Context) (*Session, error)

Save executes the query and returns the updated Session entity.

func (*SessionUpdateOne) SaveX

func (_u *SessionUpdateOne) SaveX(ctx context.Context) *Session

SaveX is like Save, but panics if an error occurs.

func (*SessionUpdateOne) Select

func (_u *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SessionUpdateOne) SetAutoYes

func (_u *SessionUpdateOne) SetAutoYes(v bool) *SessionUpdateOne

SetAutoYes sets the "auto_yes" field.

func (*SessionUpdateOne) SetBranch

func (_u *SessionUpdateOne) SetBranch(v string) *SessionUpdateOne

SetBranch sets the "branch" field.

func (*SessionUpdateOne) SetCategory

func (_u *SessionUpdateOne) SetCategory(v string) *SessionUpdateOne

SetCategory sets the "category" field.

func (*SessionUpdateOne) SetClaudeSession

func (_u *SessionUpdateOne) SetClaudeSession(v *ClaudeSession) *SessionUpdateOne

SetClaudeSession sets the "claude_session" edge to the ClaudeSession entity.

func (*SessionUpdateOne) SetClaudeSessionID

func (_u *SessionUpdateOne) SetClaudeSessionID(id int) *SessionUpdateOne

SetClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID.

func (*SessionUpdateOne) SetDiffStats

func (_u *SessionUpdateOne) SetDiffStats(v *DiffStats) *SessionUpdateOne

SetDiffStats sets the "diff_stats" edge to the DiffStats entity.

func (*SessionUpdateOne) SetDiffStatsID

func (_u *SessionUpdateOne) SetDiffStatsID(id int) *SessionUpdateOne

SetDiffStatsID sets the "diff_stats" edge to the DiffStats entity by ID.

func (*SessionUpdateOne) SetExistingWorktree

func (_u *SessionUpdateOne) SetExistingWorktree(v string) *SessionUpdateOne

SetExistingWorktree sets the "existing_worktree" field.

func (*SessionUpdateOne) SetHeight

func (_u *SessionUpdateOne) SetHeight(v int) *SessionUpdateOne

SetHeight sets the "height" field.

func (*SessionUpdateOne) SetIsExpanded

func (_u *SessionUpdateOne) SetIsExpanded(v bool) *SessionUpdateOne

SetIsExpanded sets the "is_expanded" field.

func (*SessionUpdateOne) SetLastAcknowledged

func (_u *SessionUpdateOne) SetLastAcknowledged(v time.Time) *SessionUpdateOne

SetLastAcknowledged sets the "last_acknowledged" field.

func (*SessionUpdateOne) SetLastAddedToQueue

func (_u *SessionUpdateOne) SetLastAddedToQueue(v time.Time) *SessionUpdateOne

SetLastAddedToQueue sets the "last_added_to_queue" field.

func (*SessionUpdateOne) SetLastMeaningfulOutput

func (_u *SessionUpdateOne) SetLastMeaningfulOutput(v time.Time) *SessionUpdateOne

SetLastMeaningfulOutput sets the "last_meaningful_output" field.

func (*SessionUpdateOne) SetLastOutputSignature

func (_u *SessionUpdateOne) SetLastOutputSignature(v string) *SessionUpdateOne

SetLastOutputSignature sets the "last_output_signature" field.

func (*SessionUpdateOne) SetLastTerminalUpdate

func (_u *SessionUpdateOne) SetLastTerminalUpdate(v time.Time) *SessionUpdateOne

SetLastTerminalUpdate sets the "last_terminal_update" field.

func (*SessionUpdateOne) SetLastViewed

func (_u *SessionUpdateOne) SetLastViewed(v time.Time) *SessionUpdateOne

SetLastViewed sets the "last_viewed" field.

func (*SessionUpdateOne) SetNillableAutoYes

func (_u *SessionUpdateOne) SetNillableAutoYes(v *bool) *SessionUpdateOne

SetNillableAutoYes sets the "auto_yes" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableBranch

func (_u *SessionUpdateOne) SetNillableBranch(v *string) *SessionUpdateOne

SetNillableBranch sets the "branch" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableCategory

func (_u *SessionUpdateOne) SetNillableCategory(v *string) *SessionUpdateOne

SetNillableCategory sets the "category" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableClaudeSessionID

func (_u *SessionUpdateOne) SetNillableClaudeSessionID(id *int) *SessionUpdateOne

SetNillableClaudeSessionID sets the "claude_session" edge to the ClaudeSession entity by ID if the given value is not nil.

func (*SessionUpdateOne) SetNillableDiffStatsID

func (_u *SessionUpdateOne) SetNillableDiffStatsID(id *int) *SessionUpdateOne

SetNillableDiffStatsID sets the "diff_stats" edge to the DiffStats entity by ID if the given value is not nil.

func (*SessionUpdateOne) SetNillableExistingWorktree

func (_u *SessionUpdateOne) SetNillableExistingWorktree(v *string) *SessionUpdateOne

SetNillableExistingWorktree sets the "existing_worktree" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableHeight

func (_u *SessionUpdateOne) SetNillableHeight(v *int) *SessionUpdateOne

SetNillableHeight sets the "height" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableIsExpanded

func (_u *SessionUpdateOne) SetNillableIsExpanded(v *bool) *SessionUpdateOne

SetNillableIsExpanded sets the "is_expanded" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableLastAcknowledged

func (_u *SessionUpdateOne) SetNillableLastAcknowledged(v *time.Time) *SessionUpdateOne

SetNillableLastAcknowledged sets the "last_acknowledged" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableLastAddedToQueue

func (_u *SessionUpdateOne) SetNillableLastAddedToQueue(v *time.Time) *SessionUpdateOne

SetNillableLastAddedToQueue sets the "last_added_to_queue" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableLastMeaningfulOutput

func (_u *SessionUpdateOne) SetNillableLastMeaningfulOutput(v *time.Time) *SessionUpdateOne

SetNillableLastMeaningfulOutput sets the "last_meaningful_output" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableLastOutputSignature

func (_u *SessionUpdateOne) SetNillableLastOutputSignature(v *string) *SessionUpdateOne

SetNillableLastOutputSignature sets the "last_output_signature" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableLastTerminalUpdate

func (_u *SessionUpdateOne) SetNillableLastTerminalUpdate(v *time.Time) *SessionUpdateOne

SetNillableLastTerminalUpdate sets the "last_terminal_update" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableLastViewed

func (_u *SessionUpdateOne) SetNillableLastViewed(v *time.Time) *SessionUpdateOne

SetNillableLastViewed sets the "last_viewed" field if the given value is not nil.

func (*SessionUpdateOne) SetNillablePath

func (_u *SessionUpdateOne) SetNillablePath(v *string) *SessionUpdateOne

SetNillablePath sets the "path" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableProgram

func (_u *SessionUpdateOne) SetNillableProgram(v *string) *SessionUpdateOne

SetNillableProgram sets the "program" field if the given value is not nil.

func (*SessionUpdateOne) SetNillablePrompt

func (_u *SessionUpdateOne) SetNillablePrompt(v *string) *SessionUpdateOne

SetNillablePrompt sets the "prompt" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableSessionType

func (_u *SessionUpdateOne) SetNillableSessionType(v *string) *SessionUpdateOne

SetNillableSessionType sets the "session_type" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableStatus

func (_u *SessionUpdateOne) SetNillableStatus(v *int) *SessionUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableTitle

func (_u *SessionUpdateOne) SetNillableTitle(v *string) *SessionUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableTmuxPrefix

func (_u *SessionUpdateOne) SetNillableTmuxPrefix(v *string) *SessionUpdateOne

SetNillableTmuxPrefix sets the "tmux_prefix" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableWidth

func (_u *SessionUpdateOne) SetNillableWidth(v *int) *SessionUpdateOne

SetNillableWidth sets the "width" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableWorkingDir

func (_u *SessionUpdateOne) SetNillableWorkingDir(v *string) *SessionUpdateOne

SetNillableWorkingDir sets the "working_dir" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableWorktreeID

func (_u *SessionUpdateOne) SetNillableWorktreeID(id *int) *SessionUpdateOne

SetNillableWorktreeID sets the "worktree" edge to the Worktree entity by ID if the given value is not nil.

func (*SessionUpdateOne) SetPath

func (_u *SessionUpdateOne) SetPath(v string) *SessionUpdateOne

SetPath sets the "path" field.

func (*SessionUpdateOne) SetProgram

func (_u *SessionUpdateOne) SetProgram(v string) *SessionUpdateOne

SetProgram sets the "program" field.

func (*SessionUpdateOne) SetPrompt

func (_u *SessionUpdateOne) SetPrompt(v string) *SessionUpdateOne

SetPrompt sets the "prompt" field.

func (*SessionUpdateOne) SetSessionType

func (_u *SessionUpdateOne) SetSessionType(v string) *SessionUpdateOne

SetSessionType sets the "session_type" field.

func (*SessionUpdateOne) SetStatus

func (_u *SessionUpdateOne) SetStatus(v int) *SessionUpdateOne

SetStatus sets the "status" field.

func (*SessionUpdateOne) SetTitle

func (_u *SessionUpdateOne) SetTitle(v string) *SessionUpdateOne

SetTitle sets the "title" field.

func (*SessionUpdateOne) SetTmuxPrefix

func (_u *SessionUpdateOne) SetTmuxPrefix(v string) *SessionUpdateOne

SetTmuxPrefix sets the "tmux_prefix" field.

func (*SessionUpdateOne) SetUpdatedAt

func (_u *SessionUpdateOne) SetUpdatedAt(v time.Time) *SessionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SessionUpdateOne) SetWidth

func (_u *SessionUpdateOne) SetWidth(v int) *SessionUpdateOne

SetWidth sets the "width" field.

func (*SessionUpdateOne) SetWorkingDir

func (_u *SessionUpdateOne) SetWorkingDir(v string) *SessionUpdateOne

SetWorkingDir sets the "working_dir" field.

func (*SessionUpdateOne) SetWorktree

func (_u *SessionUpdateOne) SetWorktree(v *Worktree) *SessionUpdateOne

SetWorktree sets the "worktree" edge to the Worktree entity.

func (*SessionUpdateOne) SetWorktreeID

func (_u *SessionUpdateOne) SetWorktreeID(id int) *SessionUpdateOne

SetWorktreeID sets the "worktree" edge to the Worktree entity by ID.

func (*SessionUpdateOne) Where

Where appends a list predicates to the SessionUpdate builder.

type SessionUpsert added in v1.12.0

type SessionUpsert struct {
	*sql.UpdateSet
}

SessionUpsert is the "OnConflict" setter.

func (*SessionUpsert) AddHeight added in v1.12.0

func (u *SessionUpsert) AddHeight(v int) *SessionUpsert

AddHeight adds v to the "height" field.

func (*SessionUpsert) AddStatus added in v1.12.0

func (u *SessionUpsert) AddStatus(v int) *SessionUpsert

AddStatus adds v to the "status" field.

func (*SessionUpsert) AddWidth added in v1.12.0

func (u *SessionUpsert) AddWidth(v int) *SessionUpsert

AddWidth adds v to the "width" field.

func (*SessionUpsert) ClearBranch added in v1.12.0

func (u *SessionUpsert) ClearBranch() *SessionUpsert

ClearBranch clears the value of the "branch" field.

func (*SessionUpsert) ClearCategory added in v1.12.0

func (u *SessionUpsert) ClearCategory() *SessionUpsert

ClearCategory clears the value of the "category" field.

func (*SessionUpsert) ClearExistingWorktree added in v1.12.0

func (u *SessionUpsert) ClearExistingWorktree() *SessionUpsert

ClearExistingWorktree clears the value of the "existing_worktree" field.

func (*SessionUpsert) ClearHeight added in v1.12.0

func (u *SessionUpsert) ClearHeight() *SessionUpsert

ClearHeight clears the value of the "height" field.

func (*SessionUpsert) ClearLastAcknowledged added in v1.12.0

func (u *SessionUpsert) ClearLastAcknowledged() *SessionUpsert

ClearLastAcknowledged clears the value of the "last_acknowledged" field.

func (*SessionUpsert) ClearLastAddedToQueue added in v1.12.0

func (u *SessionUpsert) ClearLastAddedToQueue() *SessionUpsert

ClearLastAddedToQueue clears the value of the "last_added_to_queue" field.

func (*SessionUpsert) ClearLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsert) ClearLastMeaningfulOutput() *SessionUpsert

ClearLastMeaningfulOutput clears the value of the "last_meaningful_output" field.

func (*SessionUpsert) ClearLastOutputSignature added in v1.12.0

func (u *SessionUpsert) ClearLastOutputSignature() *SessionUpsert

ClearLastOutputSignature clears the value of the "last_output_signature" field.

func (*SessionUpsert) ClearLastTerminalUpdate added in v1.12.0

func (u *SessionUpsert) ClearLastTerminalUpdate() *SessionUpsert

ClearLastTerminalUpdate clears the value of the "last_terminal_update" field.

func (*SessionUpsert) ClearLastViewed added in v1.12.0

func (u *SessionUpsert) ClearLastViewed() *SessionUpsert

ClearLastViewed clears the value of the "last_viewed" field.

func (*SessionUpsert) ClearPrompt added in v1.12.0

func (u *SessionUpsert) ClearPrompt() *SessionUpsert

ClearPrompt clears the value of the "prompt" field.

func (*SessionUpsert) ClearSessionType added in v1.12.0

func (u *SessionUpsert) ClearSessionType() *SessionUpsert

ClearSessionType clears the value of the "session_type" field.

func (*SessionUpsert) ClearTmuxPrefix added in v1.12.0

func (u *SessionUpsert) ClearTmuxPrefix() *SessionUpsert

ClearTmuxPrefix clears the value of the "tmux_prefix" field.

func (*SessionUpsert) ClearWidth added in v1.12.0

func (u *SessionUpsert) ClearWidth() *SessionUpsert

ClearWidth clears the value of the "width" field.

func (*SessionUpsert) ClearWorkingDir added in v1.12.0

func (u *SessionUpsert) ClearWorkingDir() *SessionUpsert

ClearWorkingDir clears the value of the "working_dir" field.

func (*SessionUpsert) SetAutoYes added in v1.12.0

func (u *SessionUpsert) SetAutoYes(v bool) *SessionUpsert

SetAutoYes sets the "auto_yes" field.

func (*SessionUpsert) SetBranch added in v1.12.0

func (u *SessionUpsert) SetBranch(v string) *SessionUpsert

SetBranch sets the "branch" field.

func (*SessionUpsert) SetCategory added in v1.12.0

func (u *SessionUpsert) SetCategory(v string) *SessionUpsert

SetCategory sets the "category" field.

func (*SessionUpsert) SetExistingWorktree added in v1.12.0

func (u *SessionUpsert) SetExistingWorktree(v string) *SessionUpsert

SetExistingWorktree sets the "existing_worktree" field.

func (*SessionUpsert) SetHeight added in v1.12.0

func (u *SessionUpsert) SetHeight(v int) *SessionUpsert

SetHeight sets the "height" field.

func (*SessionUpsert) SetIsExpanded added in v1.12.0

func (u *SessionUpsert) SetIsExpanded(v bool) *SessionUpsert

SetIsExpanded sets the "is_expanded" field.

func (*SessionUpsert) SetLastAcknowledged added in v1.12.0

func (u *SessionUpsert) SetLastAcknowledged(v time.Time) *SessionUpsert

SetLastAcknowledged sets the "last_acknowledged" field.

func (*SessionUpsert) SetLastAddedToQueue added in v1.12.0

func (u *SessionUpsert) SetLastAddedToQueue(v time.Time) *SessionUpsert

SetLastAddedToQueue sets the "last_added_to_queue" field.

func (*SessionUpsert) SetLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsert) SetLastMeaningfulOutput(v time.Time) *SessionUpsert

SetLastMeaningfulOutput sets the "last_meaningful_output" field.

func (*SessionUpsert) SetLastOutputSignature added in v1.12.0

func (u *SessionUpsert) SetLastOutputSignature(v string) *SessionUpsert

SetLastOutputSignature sets the "last_output_signature" field.

func (*SessionUpsert) SetLastTerminalUpdate added in v1.12.0

func (u *SessionUpsert) SetLastTerminalUpdate(v time.Time) *SessionUpsert

SetLastTerminalUpdate sets the "last_terminal_update" field.

func (*SessionUpsert) SetLastViewed added in v1.12.0

func (u *SessionUpsert) SetLastViewed(v time.Time) *SessionUpsert

SetLastViewed sets the "last_viewed" field.

func (*SessionUpsert) SetPath added in v1.12.0

func (u *SessionUpsert) SetPath(v string) *SessionUpsert

SetPath sets the "path" field.

func (*SessionUpsert) SetProgram added in v1.12.0

func (u *SessionUpsert) SetProgram(v string) *SessionUpsert

SetProgram sets the "program" field.

func (*SessionUpsert) SetPrompt added in v1.12.0

func (u *SessionUpsert) SetPrompt(v string) *SessionUpsert

SetPrompt sets the "prompt" field.

func (*SessionUpsert) SetSessionType added in v1.12.0

func (u *SessionUpsert) SetSessionType(v string) *SessionUpsert

SetSessionType sets the "session_type" field.

func (*SessionUpsert) SetStatus added in v1.12.0

func (u *SessionUpsert) SetStatus(v int) *SessionUpsert

SetStatus sets the "status" field.

func (*SessionUpsert) SetTitle added in v1.12.0

func (u *SessionUpsert) SetTitle(v string) *SessionUpsert

SetTitle sets the "title" field.

func (*SessionUpsert) SetTmuxPrefix added in v1.12.0

func (u *SessionUpsert) SetTmuxPrefix(v string) *SessionUpsert

SetTmuxPrefix sets the "tmux_prefix" field.

func (*SessionUpsert) SetUpdatedAt added in v1.12.0

func (u *SessionUpsert) SetUpdatedAt(v time.Time) *SessionUpsert

SetUpdatedAt sets the "updated_at" field.

func (*SessionUpsert) SetWidth added in v1.12.0

func (u *SessionUpsert) SetWidth(v int) *SessionUpsert

SetWidth sets the "width" field.

func (*SessionUpsert) SetWorkingDir added in v1.12.0

func (u *SessionUpsert) SetWorkingDir(v string) *SessionUpsert

SetWorkingDir sets the "working_dir" field.

func (*SessionUpsert) UpdateAutoYes added in v1.12.0

func (u *SessionUpsert) UpdateAutoYes() *SessionUpsert

UpdateAutoYes sets the "auto_yes" field to the value that was provided on create.

func (*SessionUpsert) UpdateBranch added in v1.12.0

func (u *SessionUpsert) UpdateBranch() *SessionUpsert

UpdateBranch sets the "branch" field to the value that was provided on create.

func (*SessionUpsert) UpdateCategory added in v1.12.0

func (u *SessionUpsert) UpdateCategory() *SessionUpsert

UpdateCategory sets the "category" field to the value that was provided on create.

func (*SessionUpsert) UpdateExistingWorktree added in v1.12.0

func (u *SessionUpsert) UpdateExistingWorktree() *SessionUpsert

UpdateExistingWorktree sets the "existing_worktree" field to the value that was provided on create.

func (*SessionUpsert) UpdateHeight added in v1.12.0

func (u *SessionUpsert) UpdateHeight() *SessionUpsert

UpdateHeight sets the "height" field to the value that was provided on create.

func (*SessionUpsert) UpdateIsExpanded added in v1.12.0

func (u *SessionUpsert) UpdateIsExpanded() *SessionUpsert

UpdateIsExpanded sets the "is_expanded" field to the value that was provided on create.

func (*SessionUpsert) UpdateLastAcknowledged added in v1.12.0

func (u *SessionUpsert) UpdateLastAcknowledged() *SessionUpsert

UpdateLastAcknowledged sets the "last_acknowledged" field to the value that was provided on create.

func (*SessionUpsert) UpdateLastAddedToQueue added in v1.12.0

func (u *SessionUpsert) UpdateLastAddedToQueue() *SessionUpsert

UpdateLastAddedToQueue sets the "last_added_to_queue" field to the value that was provided on create.

func (*SessionUpsert) UpdateLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsert) UpdateLastMeaningfulOutput() *SessionUpsert

UpdateLastMeaningfulOutput sets the "last_meaningful_output" field to the value that was provided on create.

func (*SessionUpsert) UpdateLastOutputSignature added in v1.12.0

func (u *SessionUpsert) UpdateLastOutputSignature() *SessionUpsert

UpdateLastOutputSignature sets the "last_output_signature" field to the value that was provided on create.

func (*SessionUpsert) UpdateLastTerminalUpdate added in v1.12.0

func (u *SessionUpsert) UpdateLastTerminalUpdate() *SessionUpsert

UpdateLastTerminalUpdate sets the "last_terminal_update" field to the value that was provided on create.

func (*SessionUpsert) UpdateLastViewed added in v1.12.0

func (u *SessionUpsert) UpdateLastViewed() *SessionUpsert

UpdateLastViewed sets the "last_viewed" field to the value that was provided on create.

func (*SessionUpsert) UpdatePath added in v1.12.0

func (u *SessionUpsert) UpdatePath() *SessionUpsert

UpdatePath sets the "path" field to the value that was provided on create.

func (*SessionUpsert) UpdateProgram added in v1.12.0

func (u *SessionUpsert) UpdateProgram() *SessionUpsert

UpdateProgram sets the "program" field to the value that was provided on create.

func (*SessionUpsert) UpdatePrompt added in v1.12.0

func (u *SessionUpsert) UpdatePrompt() *SessionUpsert

UpdatePrompt sets the "prompt" field to the value that was provided on create.

func (*SessionUpsert) UpdateSessionType added in v1.12.0

func (u *SessionUpsert) UpdateSessionType() *SessionUpsert

UpdateSessionType sets the "session_type" field to the value that was provided on create.

func (*SessionUpsert) UpdateStatus added in v1.12.0

func (u *SessionUpsert) UpdateStatus() *SessionUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*SessionUpsert) UpdateTitle added in v1.12.0

func (u *SessionUpsert) UpdateTitle() *SessionUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

func (*SessionUpsert) UpdateTmuxPrefix added in v1.12.0

func (u *SessionUpsert) UpdateTmuxPrefix() *SessionUpsert

UpdateTmuxPrefix sets the "tmux_prefix" field to the value that was provided on create.

func (*SessionUpsert) UpdateUpdatedAt added in v1.12.0

func (u *SessionUpsert) UpdateUpdatedAt() *SessionUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*SessionUpsert) UpdateWidth added in v1.12.0

func (u *SessionUpsert) UpdateWidth() *SessionUpsert

UpdateWidth sets the "width" field to the value that was provided on create.

func (*SessionUpsert) UpdateWorkingDir added in v1.12.0

func (u *SessionUpsert) UpdateWorkingDir() *SessionUpsert

UpdateWorkingDir sets the "working_dir" field to the value that was provided on create.

type SessionUpsertBulk added in v1.12.0

type SessionUpsertBulk struct {
	// contains filtered or unexported fields
}

SessionUpsertBulk is the builder for "upsert"-ing a bulk of Session nodes.

func (*SessionUpsertBulk) AddHeight added in v1.12.0

func (u *SessionUpsertBulk) AddHeight(v int) *SessionUpsertBulk

AddHeight adds v to the "height" field.

func (*SessionUpsertBulk) AddStatus added in v1.12.0

func (u *SessionUpsertBulk) AddStatus(v int) *SessionUpsertBulk

AddStatus adds v to the "status" field.

func (*SessionUpsertBulk) AddWidth added in v1.12.0

func (u *SessionUpsertBulk) AddWidth(v int) *SessionUpsertBulk

AddWidth adds v to the "width" field.

func (*SessionUpsertBulk) ClearBranch added in v1.12.0

func (u *SessionUpsertBulk) ClearBranch() *SessionUpsertBulk

ClearBranch clears the value of the "branch" field.

func (*SessionUpsertBulk) ClearCategory added in v1.12.0

func (u *SessionUpsertBulk) ClearCategory() *SessionUpsertBulk

ClearCategory clears the value of the "category" field.

func (*SessionUpsertBulk) ClearExistingWorktree added in v1.12.0

func (u *SessionUpsertBulk) ClearExistingWorktree() *SessionUpsertBulk

ClearExistingWorktree clears the value of the "existing_worktree" field.

func (*SessionUpsertBulk) ClearHeight added in v1.12.0

func (u *SessionUpsertBulk) ClearHeight() *SessionUpsertBulk

ClearHeight clears the value of the "height" field.

func (*SessionUpsertBulk) ClearLastAcknowledged added in v1.12.0

func (u *SessionUpsertBulk) ClearLastAcknowledged() *SessionUpsertBulk

ClearLastAcknowledged clears the value of the "last_acknowledged" field.

func (*SessionUpsertBulk) ClearLastAddedToQueue added in v1.12.0

func (u *SessionUpsertBulk) ClearLastAddedToQueue() *SessionUpsertBulk

ClearLastAddedToQueue clears the value of the "last_added_to_queue" field.

func (*SessionUpsertBulk) ClearLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsertBulk) ClearLastMeaningfulOutput() *SessionUpsertBulk

ClearLastMeaningfulOutput clears the value of the "last_meaningful_output" field.

func (*SessionUpsertBulk) ClearLastOutputSignature added in v1.12.0

func (u *SessionUpsertBulk) ClearLastOutputSignature() *SessionUpsertBulk

ClearLastOutputSignature clears the value of the "last_output_signature" field.

func (*SessionUpsertBulk) ClearLastTerminalUpdate added in v1.12.0

func (u *SessionUpsertBulk) ClearLastTerminalUpdate() *SessionUpsertBulk

ClearLastTerminalUpdate clears the value of the "last_terminal_update" field.

func (*SessionUpsertBulk) ClearLastViewed added in v1.12.0

func (u *SessionUpsertBulk) ClearLastViewed() *SessionUpsertBulk

ClearLastViewed clears the value of the "last_viewed" field.

func (*SessionUpsertBulk) ClearPrompt added in v1.12.0

func (u *SessionUpsertBulk) ClearPrompt() *SessionUpsertBulk

ClearPrompt clears the value of the "prompt" field.

func (*SessionUpsertBulk) ClearSessionType added in v1.12.0

func (u *SessionUpsertBulk) ClearSessionType() *SessionUpsertBulk

ClearSessionType clears the value of the "session_type" field.

func (*SessionUpsertBulk) ClearTmuxPrefix added in v1.12.0

func (u *SessionUpsertBulk) ClearTmuxPrefix() *SessionUpsertBulk

ClearTmuxPrefix clears the value of the "tmux_prefix" field.

func (*SessionUpsertBulk) ClearWidth added in v1.12.0

func (u *SessionUpsertBulk) ClearWidth() *SessionUpsertBulk

ClearWidth clears the value of the "width" field.

func (*SessionUpsertBulk) ClearWorkingDir added in v1.12.0

func (u *SessionUpsertBulk) ClearWorkingDir() *SessionUpsertBulk

ClearWorkingDir clears the value of the "working_dir" field.

func (*SessionUpsertBulk) DoNothing added in v1.12.0

func (u *SessionUpsertBulk) DoNothing() *SessionUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SessionUpsertBulk) Exec added in v1.12.0

func (u *SessionUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionUpsertBulk) ExecX added in v1.12.0

func (u *SessionUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionUpsertBulk) Ignore added in v1.12.0

func (u *SessionUpsertBulk) Ignore() *SessionUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Session.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SessionUpsertBulk) SetAutoYes added in v1.12.0

func (u *SessionUpsertBulk) SetAutoYes(v bool) *SessionUpsertBulk

SetAutoYes sets the "auto_yes" field.

func (*SessionUpsertBulk) SetBranch added in v1.12.0

func (u *SessionUpsertBulk) SetBranch(v string) *SessionUpsertBulk

SetBranch sets the "branch" field.

func (*SessionUpsertBulk) SetCategory added in v1.12.0

func (u *SessionUpsertBulk) SetCategory(v string) *SessionUpsertBulk

SetCategory sets the "category" field.

func (*SessionUpsertBulk) SetExistingWorktree added in v1.12.0

func (u *SessionUpsertBulk) SetExistingWorktree(v string) *SessionUpsertBulk

SetExistingWorktree sets the "existing_worktree" field.

func (*SessionUpsertBulk) SetHeight added in v1.12.0

func (u *SessionUpsertBulk) SetHeight(v int) *SessionUpsertBulk

SetHeight sets the "height" field.

func (*SessionUpsertBulk) SetIsExpanded added in v1.12.0

func (u *SessionUpsertBulk) SetIsExpanded(v bool) *SessionUpsertBulk

SetIsExpanded sets the "is_expanded" field.

func (*SessionUpsertBulk) SetLastAcknowledged added in v1.12.0

func (u *SessionUpsertBulk) SetLastAcknowledged(v time.Time) *SessionUpsertBulk

SetLastAcknowledged sets the "last_acknowledged" field.

func (*SessionUpsertBulk) SetLastAddedToQueue added in v1.12.0

func (u *SessionUpsertBulk) SetLastAddedToQueue(v time.Time) *SessionUpsertBulk

SetLastAddedToQueue sets the "last_added_to_queue" field.

func (*SessionUpsertBulk) SetLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsertBulk) SetLastMeaningfulOutput(v time.Time) *SessionUpsertBulk

SetLastMeaningfulOutput sets the "last_meaningful_output" field.

func (*SessionUpsertBulk) SetLastOutputSignature added in v1.12.0

func (u *SessionUpsertBulk) SetLastOutputSignature(v string) *SessionUpsertBulk

SetLastOutputSignature sets the "last_output_signature" field.

func (*SessionUpsertBulk) SetLastTerminalUpdate added in v1.12.0

func (u *SessionUpsertBulk) SetLastTerminalUpdate(v time.Time) *SessionUpsertBulk

SetLastTerminalUpdate sets the "last_terminal_update" field.

func (*SessionUpsertBulk) SetLastViewed added in v1.12.0

func (u *SessionUpsertBulk) SetLastViewed(v time.Time) *SessionUpsertBulk

SetLastViewed sets the "last_viewed" field.

func (*SessionUpsertBulk) SetPath added in v1.12.0

SetPath sets the "path" field.

func (*SessionUpsertBulk) SetProgram added in v1.12.0

func (u *SessionUpsertBulk) SetProgram(v string) *SessionUpsertBulk

SetProgram sets the "program" field.

func (*SessionUpsertBulk) SetPrompt added in v1.12.0

func (u *SessionUpsertBulk) SetPrompt(v string) *SessionUpsertBulk

SetPrompt sets the "prompt" field.

func (*SessionUpsertBulk) SetSessionType added in v1.12.0

func (u *SessionUpsertBulk) SetSessionType(v string) *SessionUpsertBulk

SetSessionType sets the "session_type" field.

func (*SessionUpsertBulk) SetStatus added in v1.12.0

func (u *SessionUpsertBulk) SetStatus(v int) *SessionUpsertBulk

SetStatus sets the "status" field.

func (*SessionUpsertBulk) SetTitle added in v1.12.0

func (u *SessionUpsertBulk) SetTitle(v string) *SessionUpsertBulk

SetTitle sets the "title" field.

func (*SessionUpsertBulk) SetTmuxPrefix added in v1.12.0

func (u *SessionUpsertBulk) SetTmuxPrefix(v string) *SessionUpsertBulk

SetTmuxPrefix sets the "tmux_prefix" field.

func (*SessionUpsertBulk) SetUpdatedAt added in v1.12.0

func (u *SessionUpsertBulk) SetUpdatedAt(v time.Time) *SessionUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*SessionUpsertBulk) SetWidth added in v1.12.0

func (u *SessionUpsertBulk) SetWidth(v int) *SessionUpsertBulk

SetWidth sets the "width" field.

func (*SessionUpsertBulk) SetWorkingDir added in v1.12.0

func (u *SessionUpsertBulk) SetWorkingDir(v string) *SessionUpsertBulk

SetWorkingDir sets the "working_dir" field.

func (*SessionUpsertBulk) Update added in v1.12.0

func (u *SessionUpsertBulk) Update(set func(*SessionUpsert)) *SessionUpsertBulk

Update allows overriding fields `UPDATE` values. See the SessionCreateBulk.OnConflict documentation for more info.

func (*SessionUpsertBulk) UpdateAutoYes added in v1.12.0

func (u *SessionUpsertBulk) UpdateAutoYes() *SessionUpsertBulk

UpdateAutoYes sets the "auto_yes" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateBranch added in v1.12.0

func (u *SessionUpsertBulk) UpdateBranch() *SessionUpsertBulk

UpdateBranch sets the "branch" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateCategory added in v1.12.0

func (u *SessionUpsertBulk) UpdateCategory() *SessionUpsertBulk

UpdateCategory sets the "category" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateExistingWorktree added in v1.12.0

func (u *SessionUpsertBulk) UpdateExistingWorktree() *SessionUpsertBulk

UpdateExistingWorktree sets the "existing_worktree" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateHeight added in v1.12.0

func (u *SessionUpsertBulk) UpdateHeight() *SessionUpsertBulk

UpdateHeight sets the "height" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateIsExpanded added in v1.12.0

func (u *SessionUpsertBulk) UpdateIsExpanded() *SessionUpsertBulk

UpdateIsExpanded sets the "is_expanded" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateLastAcknowledged added in v1.12.0

func (u *SessionUpsertBulk) UpdateLastAcknowledged() *SessionUpsertBulk

UpdateLastAcknowledged sets the "last_acknowledged" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateLastAddedToQueue added in v1.12.0

func (u *SessionUpsertBulk) UpdateLastAddedToQueue() *SessionUpsertBulk

UpdateLastAddedToQueue sets the "last_added_to_queue" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsertBulk) UpdateLastMeaningfulOutput() *SessionUpsertBulk

UpdateLastMeaningfulOutput sets the "last_meaningful_output" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateLastOutputSignature added in v1.12.0

func (u *SessionUpsertBulk) UpdateLastOutputSignature() *SessionUpsertBulk

UpdateLastOutputSignature sets the "last_output_signature" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateLastTerminalUpdate added in v1.12.0

func (u *SessionUpsertBulk) UpdateLastTerminalUpdate() *SessionUpsertBulk

UpdateLastTerminalUpdate sets the "last_terminal_update" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateLastViewed added in v1.12.0

func (u *SessionUpsertBulk) UpdateLastViewed() *SessionUpsertBulk

UpdateLastViewed sets the "last_viewed" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateNewValues added in v1.12.0

func (u *SessionUpsertBulk) UpdateNewValues() *SessionUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Session.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SessionUpsertBulk) UpdatePath added in v1.12.0

func (u *SessionUpsertBulk) UpdatePath() *SessionUpsertBulk

UpdatePath sets the "path" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateProgram added in v1.12.0

func (u *SessionUpsertBulk) UpdateProgram() *SessionUpsertBulk

UpdateProgram sets the "program" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdatePrompt added in v1.12.0

func (u *SessionUpsertBulk) UpdatePrompt() *SessionUpsertBulk

UpdatePrompt sets the "prompt" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateSessionType added in v1.12.0

func (u *SessionUpsertBulk) UpdateSessionType() *SessionUpsertBulk

UpdateSessionType sets the "session_type" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateStatus added in v1.12.0

func (u *SessionUpsertBulk) UpdateStatus() *SessionUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateTitle added in v1.12.0

func (u *SessionUpsertBulk) UpdateTitle() *SessionUpsertBulk

UpdateTitle sets the "title" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateTmuxPrefix added in v1.12.0

func (u *SessionUpsertBulk) UpdateTmuxPrefix() *SessionUpsertBulk

UpdateTmuxPrefix sets the "tmux_prefix" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateUpdatedAt added in v1.12.0

func (u *SessionUpsertBulk) UpdateUpdatedAt() *SessionUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateWidth added in v1.12.0

func (u *SessionUpsertBulk) UpdateWidth() *SessionUpsertBulk

UpdateWidth sets the "width" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateWorkingDir added in v1.12.0

func (u *SessionUpsertBulk) UpdateWorkingDir() *SessionUpsertBulk

UpdateWorkingDir sets the "working_dir" field to the value that was provided on create.

type SessionUpsertOne added in v1.12.0

type SessionUpsertOne struct {
	// contains filtered or unexported fields
}

SessionUpsertOne is the builder for "upsert"-ing

one Session node.

func (*SessionUpsertOne) AddHeight added in v1.12.0

func (u *SessionUpsertOne) AddHeight(v int) *SessionUpsertOne

AddHeight adds v to the "height" field.

func (*SessionUpsertOne) AddStatus added in v1.12.0

func (u *SessionUpsertOne) AddStatus(v int) *SessionUpsertOne

AddStatus adds v to the "status" field.

func (*SessionUpsertOne) AddWidth added in v1.12.0

func (u *SessionUpsertOne) AddWidth(v int) *SessionUpsertOne

AddWidth adds v to the "width" field.

func (*SessionUpsertOne) ClearBranch added in v1.12.0

func (u *SessionUpsertOne) ClearBranch() *SessionUpsertOne

ClearBranch clears the value of the "branch" field.

func (*SessionUpsertOne) ClearCategory added in v1.12.0

func (u *SessionUpsertOne) ClearCategory() *SessionUpsertOne

ClearCategory clears the value of the "category" field.

func (*SessionUpsertOne) ClearExistingWorktree added in v1.12.0

func (u *SessionUpsertOne) ClearExistingWorktree() *SessionUpsertOne

ClearExistingWorktree clears the value of the "existing_worktree" field.

func (*SessionUpsertOne) ClearHeight added in v1.12.0

func (u *SessionUpsertOne) ClearHeight() *SessionUpsertOne

ClearHeight clears the value of the "height" field.

func (*SessionUpsertOne) ClearLastAcknowledged added in v1.12.0

func (u *SessionUpsertOne) ClearLastAcknowledged() *SessionUpsertOne

ClearLastAcknowledged clears the value of the "last_acknowledged" field.

func (*SessionUpsertOne) ClearLastAddedToQueue added in v1.12.0

func (u *SessionUpsertOne) ClearLastAddedToQueue() *SessionUpsertOne

ClearLastAddedToQueue clears the value of the "last_added_to_queue" field.

func (*SessionUpsertOne) ClearLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsertOne) ClearLastMeaningfulOutput() *SessionUpsertOne

ClearLastMeaningfulOutput clears the value of the "last_meaningful_output" field.

func (*SessionUpsertOne) ClearLastOutputSignature added in v1.12.0

func (u *SessionUpsertOne) ClearLastOutputSignature() *SessionUpsertOne

ClearLastOutputSignature clears the value of the "last_output_signature" field.

func (*SessionUpsertOne) ClearLastTerminalUpdate added in v1.12.0

func (u *SessionUpsertOne) ClearLastTerminalUpdate() *SessionUpsertOne

ClearLastTerminalUpdate clears the value of the "last_terminal_update" field.

func (*SessionUpsertOne) ClearLastViewed added in v1.12.0

func (u *SessionUpsertOne) ClearLastViewed() *SessionUpsertOne

ClearLastViewed clears the value of the "last_viewed" field.

func (*SessionUpsertOne) ClearPrompt added in v1.12.0

func (u *SessionUpsertOne) ClearPrompt() *SessionUpsertOne

ClearPrompt clears the value of the "prompt" field.

func (*SessionUpsertOne) ClearSessionType added in v1.12.0

func (u *SessionUpsertOne) ClearSessionType() *SessionUpsertOne

ClearSessionType clears the value of the "session_type" field.

func (*SessionUpsertOne) ClearTmuxPrefix added in v1.12.0

func (u *SessionUpsertOne) ClearTmuxPrefix() *SessionUpsertOne

ClearTmuxPrefix clears the value of the "tmux_prefix" field.

func (*SessionUpsertOne) ClearWidth added in v1.12.0

func (u *SessionUpsertOne) ClearWidth() *SessionUpsertOne

ClearWidth clears the value of the "width" field.

func (*SessionUpsertOne) ClearWorkingDir added in v1.12.0

func (u *SessionUpsertOne) ClearWorkingDir() *SessionUpsertOne

ClearWorkingDir clears the value of the "working_dir" field.

func (*SessionUpsertOne) DoNothing added in v1.12.0

func (u *SessionUpsertOne) DoNothing() *SessionUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SessionUpsertOne) Exec added in v1.12.0

func (u *SessionUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionUpsertOne) ExecX added in v1.12.0

func (u *SessionUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionUpsertOne) ID added in v1.12.0

func (u *SessionUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SessionUpsertOne) IDX added in v1.12.0

func (u *SessionUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SessionUpsertOne) Ignore added in v1.12.0

func (u *SessionUpsertOne) Ignore() *SessionUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Session.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SessionUpsertOne) SetAutoYes added in v1.12.0

func (u *SessionUpsertOne) SetAutoYes(v bool) *SessionUpsertOne

SetAutoYes sets the "auto_yes" field.

func (*SessionUpsertOne) SetBranch added in v1.12.0

func (u *SessionUpsertOne) SetBranch(v string) *SessionUpsertOne

SetBranch sets the "branch" field.

func (*SessionUpsertOne) SetCategory added in v1.12.0

func (u *SessionUpsertOne) SetCategory(v string) *SessionUpsertOne

SetCategory sets the "category" field.

func (*SessionUpsertOne) SetExistingWorktree added in v1.12.0

func (u *SessionUpsertOne) SetExistingWorktree(v string) *SessionUpsertOne

SetExistingWorktree sets the "existing_worktree" field.

func (*SessionUpsertOne) SetHeight added in v1.12.0

func (u *SessionUpsertOne) SetHeight(v int) *SessionUpsertOne

SetHeight sets the "height" field.

func (*SessionUpsertOne) SetIsExpanded added in v1.12.0

func (u *SessionUpsertOne) SetIsExpanded(v bool) *SessionUpsertOne

SetIsExpanded sets the "is_expanded" field.

func (*SessionUpsertOne) SetLastAcknowledged added in v1.12.0

func (u *SessionUpsertOne) SetLastAcknowledged(v time.Time) *SessionUpsertOne

SetLastAcknowledged sets the "last_acknowledged" field.

func (*SessionUpsertOne) SetLastAddedToQueue added in v1.12.0

func (u *SessionUpsertOne) SetLastAddedToQueue(v time.Time) *SessionUpsertOne

SetLastAddedToQueue sets the "last_added_to_queue" field.

func (*SessionUpsertOne) SetLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsertOne) SetLastMeaningfulOutput(v time.Time) *SessionUpsertOne

SetLastMeaningfulOutput sets the "last_meaningful_output" field.

func (*SessionUpsertOne) SetLastOutputSignature added in v1.12.0

func (u *SessionUpsertOne) SetLastOutputSignature(v string) *SessionUpsertOne

SetLastOutputSignature sets the "last_output_signature" field.

func (*SessionUpsertOne) SetLastTerminalUpdate added in v1.12.0

func (u *SessionUpsertOne) SetLastTerminalUpdate(v time.Time) *SessionUpsertOne

SetLastTerminalUpdate sets the "last_terminal_update" field.

func (*SessionUpsertOne) SetLastViewed added in v1.12.0

func (u *SessionUpsertOne) SetLastViewed(v time.Time) *SessionUpsertOne

SetLastViewed sets the "last_viewed" field.

func (*SessionUpsertOne) SetPath added in v1.12.0

func (u *SessionUpsertOne) SetPath(v string) *SessionUpsertOne

SetPath sets the "path" field.

func (*SessionUpsertOne) SetProgram added in v1.12.0

func (u *SessionUpsertOne) SetProgram(v string) *SessionUpsertOne

SetProgram sets the "program" field.

func (*SessionUpsertOne) SetPrompt added in v1.12.0

func (u *SessionUpsertOne) SetPrompt(v string) *SessionUpsertOne

SetPrompt sets the "prompt" field.

func (*SessionUpsertOne) SetSessionType added in v1.12.0

func (u *SessionUpsertOne) SetSessionType(v string) *SessionUpsertOne

SetSessionType sets the "session_type" field.

func (*SessionUpsertOne) SetStatus added in v1.12.0

func (u *SessionUpsertOne) SetStatus(v int) *SessionUpsertOne

SetStatus sets the "status" field.

func (*SessionUpsertOne) SetTitle added in v1.12.0

func (u *SessionUpsertOne) SetTitle(v string) *SessionUpsertOne

SetTitle sets the "title" field.

func (*SessionUpsertOne) SetTmuxPrefix added in v1.12.0

func (u *SessionUpsertOne) SetTmuxPrefix(v string) *SessionUpsertOne

SetTmuxPrefix sets the "tmux_prefix" field.

func (*SessionUpsertOne) SetUpdatedAt added in v1.12.0

func (u *SessionUpsertOne) SetUpdatedAt(v time.Time) *SessionUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*SessionUpsertOne) SetWidth added in v1.12.0

func (u *SessionUpsertOne) SetWidth(v int) *SessionUpsertOne

SetWidth sets the "width" field.

func (*SessionUpsertOne) SetWorkingDir added in v1.12.0

func (u *SessionUpsertOne) SetWorkingDir(v string) *SessionUpsertOne

SetWorkingDir sets the "working_dir" field.

func (*SessionUpsertOne) Update added in v1.12.0

func (u *SessionUpsertOne) Update(set func(*SessionUpsert)) *SessionUpsertOne

Update allows overriding fields `UPDATE` values. See the SessionCreate.OnConflict documentation for more info.

func (*SessionUpsertOne) UpdateAutoYes added in v1.12.0

func (u *SessionUpsertOne) UpdateAutoYes() *SessionUpsertOne

UpdateAutoYes sets the "auto_yes" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateBranch added in v1.12.0

func (u *SessionUpsertOne) UpdateBranch() *SessionUpsertOne

UpdateBranch sets the "branch" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateCategory added in v1.12.0

func (u *SessionUpsertOne) UpdateCategory() *SessionUpsertOne

UpdateCategory sets the "category" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateExistingWorktree added in v1.12.0

func (u *SessionUpsertOne) UpdateExistingWorktree() *SessionUpsertOne

UpdateExistingWorktree sets the "existing_worktree" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateHeight added in v1.12.0

func (u *SessionUpsertOne) UpdateHeight() *SessionUpsertOne

UpdateHeight sets the "height" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateIsExpanded added in v1.12.0

func (u *SessionUpsertOne) UpdateIsExpanded() *SessionUpsertOne

UpdateIsExpanded sets the "is_expanded" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateLastAcknowledged added in v1.12.0

func (u *SessionUpsertOne) UpdateLastAcknowledged() *SessionUpsertOne

UpdateLastAcknowledged sets the "last_acknowledged" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateLastAddedToQueue added in v1.12.0

func (u *SessionUpsertOne) UpdateLastAddedToQueue() *SessionUpsertOne

UpdateLastAddedToQueue sets the "last_added_to_queue" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateLastMeaningfulOutput added in v1.12.0

func (u *SessionUpsertOne) UpdateLastMeaningfulOutput() *SessionUpsertOne

UpdateLastMeaningfulOutput sets the "last_meaningful_output" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateLastOutputSignature added in v1.12.0

func (u *SessionUpsertOne) UpdateLastOutputSignature() *SessionUpsertOne

UpdateLastOutputSignature sets the "last_output_signature" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateLastTerminalUpdate added in v1.12.0

func (u *SessionUpsertOne) UpdateLastTerminalUpdate() *SessionUpsertOne

UpdateLastTerminalUpdate sets the "last_terminal_update" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateLastViewed added in v1.12.0

func (u *SessionUpsertOne) UpdateLastViewed() *SessionUpsertOne

UpdateLastViewed sets the "last_viewed" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateNewValues added in v1.12.0

func (u *SessionUpsertOne) UpdateNewValues() *SessionUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Session.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SessionUpsertOne) UpdatePath added in v1.12.0

func (u *SessionUpsertOne) UpdatePath() *SessionUpsertOne

UpdatePath sets the "path" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateProgram added in v1.12.0

func (u *SessionUpsertOne) UpdateProgram() *SessionUpsertOne

UpdateProgram sets the "program" field to the value that was provided on create.

func (*SessionUpsertOne) UpdatePrompt added in v1.12.0

func (u *SessionUpsertOne) UpdatePrompt() *SessionUpsertOne

UpdatePrompt sets the "prompt" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateSessionType added in v1.12.0

func (u *SessionUpsertOne) UpdateSessionType() *SessionUpsertOne

UpdateSessionType sets the "session_type" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateStatus added in v1.12.0

func (u *SessionUpsertOne) UpdateStatus() *SessionUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateTitle added in v1.12.0

func (u *SessionUpsertOne) UpdateTitle() *SessionUpsertOne

UpdateTitle sets the "title" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateTmuxPrefix added in v1.12.0

func (u *SessionUpsertOne) UpdateTmuxPrefix() *SessionUpsertOne

UpdateTmuxPrefix sets the "tmux_prefix" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateUpdatedAt added in v1.12.0

func (u *SessionUpsertOne) UpdateUpdatedAt() *SessionUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateWidth added in v1.12.0

func (u *SessionUpsertOne) UpdateWidth() *SessionUpsertOne

UpdateWidth sets the "width" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateWorkingDir added in v1.12.0

func (u *SessionUpsertOne) UpdateWorkingDir() *SessionUpsertOne

UpdateWorkingDir sets the "working_dir" field to the value that was provided on create.

type Sessions

type Sessions []*Session

Sessions is a parsable slice of Session.

type Tag

type Tag struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TagQuery when eager-loading is set.
	Edges TagEdges `json:"edges"`
	// contains filtered or unexported fields
}

Tag is the model entity for the Tag schema.

func (*Tag) QuerySessions

func (_m *Tag) QuerySessions() *SessionQuery

QuerySessions queries the "sessions" edge of the Tag entity.

func (*Tag) String

func (_m *Tag) String() string

String implements the fmt.Stringer.

func (*Tag) Unwrap

func (_m *Tag) Unwrap() *Tag

Unwrap unwraps the Tag 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 (*Tag) Update

func (_m *Tag) Update() *TagUpdateOne

Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.

func (*Tag) Value

func (_m *Tag) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Tag. This includes values selected through modifiers, order, etc.

type TagClient

type TagClient struct {
	// contains filtered or unexported fields
}

TagClient is a client for the Tag schema.

func NewTagClient

func NewTagClient(c config) *TagClient

NewTagClient returns a client for the Tag from the given config.

func (*TagClient) Create

func (c *TagClient) Create() *TagCreate

Create returns a builder for creating a Tag entity.

func (*TagClient) CreateBulk

func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk

CreateBulk returns a builder for creating a bulk of Tag entities.

func (*TagClient) Delete

func (c *TagClient) Delete() *TagDelete

Delete returns a delete builder for Tag.

func (*TagClient) DeleteOne

func (c *TagClient) DeleteOne(_m *Tag) *TagDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TagClient) DeleteOneID

func (c *TagClient) DeleteOneID(id int) *TagDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TagClient) Get

func (c *TagClient) Get(ctx context.Context, id int) (*Tag, error)

Get returns a Tag entity by its id.

func (*TagClient) GetX

func (c *TagClient) GetX(ctx context.Context, id int) *Tag

GetX is like Get, but panics if an error occurs.

func (*TagClient) Hooks

func (c *TagClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TagClient) Intercept

func (c *TagClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.

func (*TagClient) Interceptors

func (c *TagClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TagClient) MapCreateBulk

func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk

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 (*TagClient) Query

func (c *TagClient) Query() *TagQuery

Query returns a query builder for Tag.

func (*TagClient) QuerySessions

func (c *TagClient) QuerySessions(_m *Tag) *SessionQuery

QuerySessions queries the sessions edge of a Tag.

func (*TagClient) Update

func (c *TagClient) Update() *TagUpdate

Update returns an update builder for Tag.

func (*TagClient) UpdateOne

func (c *TagClient) UpdateOne(_m *Tag) *TagUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TagClient) UpdateOneID

func (c *TagClient) UpdateOneID(id int) *TagUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TagClient) Use

func (c *TagClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tag.Hooks(f(g(h())))`.

type TagCreate

type TagCreate struct {
	// contains filtered or unexported fields
}

TagCreate is the builder for creating a Tag entity.

func (*TagCreate) AddSessionIDs

func (_c *TagCreate) AddSessionIDs(ids ...int) *TagCreate

AddSessionIDs adds the "sessions" edge to the Session entity by IDs.

func (*TagCreate) AddSessions

func (_c *TagCreate) AddSessions(v ...*Session) *TagCreate

AddSessions adds the "sessions" edges to the Session entity.

func (*TagCreate) Exec

func (_c *TagCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TagCreate) ExecX

func (_c *TagCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TagCreate) Mutation

func (_c *TagCreate) Mutation() *TagMutation

Mutation returns the TagMutation object of the builder.

func (*TagCreate) OnConflict added in v1.12.0

func (_c *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Tag.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.TagUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TagCreate) OnConflictColumns added in v1.12.0

func (_c *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Tag.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TagCreate) Save

func (_c *TagCreate) Save(ctx context.Context) (*Tag, error)

Save creates the Tag in the database.

func (*TagCreate) SaveX

func (_c *TagCreate) SaveX(ctx context.Context) *Tag

SaveX calls Save and panics if Save returns an error.

func (*TagCreate) SetName

func (_c *TagCreate) SetName(v string) *TagCreate

SetName sets the "name" field.

type TagCreateBulk

type TagCreateBulk struct {
	// contains filtered or unexported fields
}

TagCreateBulk is the builder for creating many Tag entities in bulk.

func (*TagCreateBulk) Exec

func (_c *TagCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TagCreateBulk) ExecX

func (_c *TagCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TagCreateBulk) OnConflict added in v1.12.0

func (_c *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Tag.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.TagUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TagCreateBulk) OnConflictColumns added in v1.12.0

func (_c *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Tag.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TagCreateBulk) Save

func (_c *TagCreateBulk) Save(ctx context.Context) ([]*Tag, error)

Save creates the Tag entities in the database.

func (*TagCreateBulk) SaveX

func (_c *TagCreateBulk) SaveX(ctx context.Context) []*Tag

SaveX is like Save, but panics if an error occurs.

type TagDelete

type TagDelete struct {
	// contains filtered or unexported fields
}

TagDelete is the builder for deleting a Tag entity.

func (*TagDelete) Exec

func (_d *TagDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TagDelete) ExecX

func (_d *TagDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TagDelete) Where

func (_d *TagDelete) Where(ps ...predicate.Tag) *TagDelete

Where appends a list predicates to the TagDelete builder.

type TagDeleteOne

type TagDeleteOne struct {
	// contains filtered or unexported fields
}

TagDeleteOne is the builder for deleting a single Tag entity.

func (*TagDeleteOne) Exec

func (_d *TagDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TagDeleteOne) ExecX

func (_d *TagDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TagDeleteOne) Where

func (_d *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne

Where appends a list predicates to the TagDelete builder.

type TagEdges

type TagEdges struct {
	// Sessions holds the value of the sessions edge.
	Sessions []*Session `json:"sessions,omitempty"`
	// contains filtered or unexported fields
}

TagEdges holds the relations/edges for other nodes in the graph.

func (TagEdges) SessionsOrErr

func (e TagEdges) SessionsOrErr() ([]*Session, error)

SessionsOrErr returns the Sessions value or an error if the edge was not loaded in eager-loading.

type TagGroupBy

type TagGroupBy struct {
	// contains filtered or unexported fields
}

TagGroupBy is the group-by builder for Tag entities.

func (*TagGroupBy) Aggregate

func (_g *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TagGroupBy) Bool

func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) BoolX

func (s *TagGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TagGroupBy) Bools

func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) BoolsX

func (s *TagGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TagGroupBy) Float64

func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) Float64X

func (s *TagGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TagGroupBy) Float64s

func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) Float64sX

func (s *TagGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TagGroupBy) Int

func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) IntX

func (s *TagGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TagGroupBy) Ints

func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) IntsX

func (s *TagGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TagGroupBy) Scan

func (_g *TagGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TagGroupBy) ScanX

func (s *TagGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TagGroupBy) String

func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) StringX

func (s *TagGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TagGroupBy) Strings

func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TagGroupBy) StringsX

func (s *TagGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TagMutation

type TagMutation struct {
	// contains filtered or unexported fields
}

TagMutation represents an operation that mutates the Tag nodes in the graph.

func (*TagMutation) AddField

func (m *TagMutation) 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 (*TagMutation) AddSessionIDs

func (m *TagMutation) AddSessionIDs(ids ...int)

AddSessionIDs adds the "sessions" edge to the Session entity by ids.

func (*TagMutation) AddedEdges

func (m *TagMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TagMutation) AddedField

func (m *TagMutation) 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 (*TagMutation) AddedFields

func (m *TagMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TagMutation) AddedIDs

func (m *TagMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TagMutation) ClearEdge

func (m *TagMutation) 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 (*TagMutation) ClearField

func (m *TagMutation) 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 (*TagMutation) ClearSessions

func (m *TagMutation) ClearSessions()

ClearSessions clears the "sessions" edge to the Session entity.

func (*TagMutation) ClearedEdges

func (m *TagMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TagMutation) ClearedFields

func (m *TagMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TagMutation) Client

func (m TagMutation) 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 (*TagMutation) EdgeCleared

func (m *TagMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TagMutation) Field

func (m *TagMutation) 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 (*TagMutation) FieldCleared

func (m *TagMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TagMutation) Fields

func (m *TagMutation) 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 (*TagMutation) ID

func (m *TagMutation) 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 (*TagMutation) IDs

func (m *TagMutation) 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 (*TagMutation) Name

func (m *TagMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TagMutation) OldField

func (m *TagMutation) 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 (*TagMutation) OldName

func (m *TagMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Tag entity. If the Tag 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 (*TagMutation) Op

func (m *TagMutation) Op() Op

Op returns the operation name.

func (*TagMutation) RemoveSessionIDs

func (m *TagMutation) RemoveSessionIDs(ids ...int)

RemoveSessionIDs removes the "sessions" edge to the Session entity by IDs.

func (*TagMutation) RemovedEdges

func (m *TagMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TagMutation) RemovedIDs

func (m *TagMutation) 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 (*TagMutation) RemovedSessionsIDs

func (m *TagMutation) RemovedSessionsIDs() (ids []int)

RemovedSessions returns the removed IDs of the "sessions" edge to the Session entity.

func (*TagMutation) ResetEdge

func (m *TagMutation) 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 (*TagMutation) ResetField

func (m *TagMutation) 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 (*TagMutation) ResetName

func (m *TagMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TagMutation) ResetSessions

func (m *TagMutation) ResetSessions()

ResetSessions resets all changes to the "sessions" edge.

func (*TagMutation) SessionsCleared

func (m *TagMutation) SessionsCleared() bool

SessionsCleared reports if the "sessions" edge to the Session entity was cleared.

func (*TagMutation) SessionsIDs

func (m *TagMutation) SessionsIDs() (ids []int)

SessionsIDs returns the "sessions" edge IDs in the mutation.

func (*TagMutation) SetField

func (m *TagMutation) 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 (*TagMutation) SetName

func (m *TagMutation) SetName(s string)

SetName sets the "name" field.

func (*TagMutation) SetOp

func (m *TagMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (TagMutation) Tx

func (m TagMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TagMutation) Type

func (m *TagMutation) Type() string

Type returns the node type of this mutation (Tag).

func (*TagMutation) Where

func (m *TagMutation) Where(ps ...predicate.Tag)

Where appends a list predicates to the TagMutation builder.

func (*TagMutation) WhereP

func (m *TagMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TagQuery

type TagQuery struct {
	// contains filtered or unexported fields
}

TagQuery is the builder for querying Tag entities.

func (*TagQuery) Aggregate

func (_q *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect

Aggregate returns a TagSelect configured with the given aggregations.

func (*TagQuery) All

func (_q *TagQuery) All(ctx context.Context) ([]*Tag, error)

All executes the query and returns a list of Tags.

func (*TagQuery) AllX

func (_q *TagQuery) AllX(ctx context.Context) []*Tag

AllX is like All, but panics if an error occurs.

func (*TagQuery) Clone

func (_q *TagQuery) Clone() *TagQuery

Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TagQuery) Count

func (_q *TagQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TagQuery) CountX

func (_q *TagQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TagQuery) Exist

func (_q *TagQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TagQuery) ExistX

func (_q *TagQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TagQuery) First

func (_q *TagQuery) First(ctx context.Context) (*Tag, error)

First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.

func (*TagQuery) FirstID

func (_q *TagQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.

func (*TagQuery) FirstIDX

func (_q *TagQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TagQuery) FirstX

func (_q *TagQuery) FirstX(ctx context.Context) *Tag

FirstX is like First, but panics if an error occurs.

func (*TagQuery) GroupBy

func (_q *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy

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.Tag.Query().
	GroupBy(tag.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TagQuery) IDs

func (_q *TagQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Tag IDs.

func (*TagQuery) IDsX

func (_q *TagQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TagQuery) Limit

func (_q *TagQuery) Limit(limit int) *TagQuery

Limit the number of records to be returned by this query.

func (*TagQuery) Offset

func (_q *TagQuery) Offset(offset int) *TagQuery

Offset to start from.

func (*TagQuery) Only

func (_q *TagQuery) Only(ctx context.Context) (*Tag, error)

Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.

func (*TagQuery) OnlyID

func (_q *TagQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.

func (*TagQuery) OnlyIDX

func (_q *TagQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TagQuery) OnlyX

func (_q *TagQuery) OnlyX(ctx context.Context) *Tag

OnlyX is like Only, but panics if an error occurs.

func (*TagQuery) Order

func (_q *TagQuery) Order(o ...tag.OrderOption) *TagQuery

Order specifies how the records should be ordered.

func (*TagQuery) QuerySessions

func (_q *TagQuery) QuerySessions() *SessionQuery

QuerySessions chains the current query on the "sessions" edge.

func (*TagQuery) Select

func (_q *TagQuery) Select(fields ...string) *TagSelect

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.Tag.Query().
	Select(tag.FieldName).
	Scan(ctx, &v)

func (*TagQuery) Unique

func (_q *TagQuery) Unique(unique bool) *TagQuery

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 (*TagQuery) Where

func (_q *TagQuery) Where(ps ...predicate.Tag) *TagQuery

Where adds a new predicate for the TagQuery builder.

func (*TagQuery) WithSessions

func (_q *TagQuery) WithSessions(opts ...func(*SessionQuery)) *TagQuery

WithSessions tells the query-builder to eager-load the nodes that are connected to the "sessions" edge. The optional arguments are used to configure the query builder of the edge.

type TagSelect

type TagSelect struct {
	*TagQuery
	// contains filtered or unexported fields
}

TagSelect is the builder for selecting fields of Tag entities.

func (*TagSelect) Aggregate

func (_s *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TagSelect) Bool

func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TagSelect) BoolX

func (s *TagSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TagSelect) Bools

func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TagSelect) BoolsX

func (s *TagSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TagSelect) Float64

func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TagSelect) Float64X

func (s *TagSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TagSelect) Float64s

func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TagSelect) Float64sX

func (s *TagSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TagSelect) Int

func (s *TagSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TagSelect) IntX

func (s *TagSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TagSelect) Ints

func (s *TagSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TagSelect) IntsX

func (s *TagSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TagSelect) Scan

func (_s *TagSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TagSelect) ScanX

func (s *TagSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TagSelect) String

func (s *TagSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TagSelect) StringX

func (s *TagSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TagSelect) Strings

func (s *TagSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TagSelect) StringsX

func (s *TagSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TagUpdate

type TagUpdate struct {
	// contains filtered or unexported fields
}

TagUpdate is the builder for updating Tag entities.

func (*TagUpdate) AddSessionIDs

func (_u *TagUpdate) AddSessionIDs(ids ...int) *TagUpdate

AddSessionIDs adds the "sessions" edge to the Session entity by IDs.

func (*TagUpdate) AddSessions

func (_u *TagUpdate) AddSessions(v ...*Session) *TagUpdate

AddSessions adds the "sessions" edges to the Session entity.

func (*TagUpdate) ClearSessions

func (_u *TagUpdate) ClearSessions() *TagUpdate

ClearSessions clears all "sessions" edges to the Session entity.

func (*TagUpdate) Exec

func (_u *TagUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TagUpdate) ExecX

func (_u *TagUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TagUpdate) Mutation

func (_u *TagUpdate) Mutation() *TagMutation

Mutation returns the TagMutation object of the builder.

func (*TagUpdate) RemoveSessionIDs

func (_u *TagUpdate) RemoveSessionIDs(ids ...int) *TagUpdate

RemoveSessionIDs removes the "sessions" edge to Session entities by IDs.

func (*TagUpdate) RemoveSessions

func (_u *TagUpdate) RemoveSessions(v ...*Session) *TagUpdate

RemoveSessions removes "sessions" edges to Session entities.

func (*TagUpdate) Save

func (_u *TagUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TagUpdate) SaveX

func (_u *TagUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TagUpdate) SetName

func (_u *TagUpdate) SetName(v string) *TagUpdate

SetName sets the "name" field.

func (*TagUpdate) SetNillableName

func (_u *TagUpdate) SetNillableName(v *string) *TagUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*TagUpdate) Where

func (_u *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate

Where appends a list predicates to the TagUpdate builder.

type TagUpdateOne

type TagUpdateOne struct {
	// contains filtered or unexported fields
}

TagUpdateOne is the builder for updating a single Tag entity.

func (*TagUpdateOne) AddSessionIDs

func (_u *TagUpdateOne) AddSessionIDs(ids ...int) *TagUpdateOne

AddSessionIDs adds the "sessions" edge to the Session entity by IDs.

func (*TagUpdateOne) AddSessions

func (_u *TagUpdateOne) AddSessions(v ...*Session) *TagUpdateOne

AddSessions adds the "sessions" edges to the Session entity.

func (*TagUpdateOne) ClearSessions

func (_u *TagUpdateOne) ClearSessions() *TagUpdateOne

ClearSessions clears all "sessions" edges to the Session entity.

func (*TagUpdateOne) Exec

func (_u *TagUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TagUpdateOne) ExecX

func (_u *TagUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TagUpdateOne) Mutation

func (_u *TagUpdateOne) Mutation() *TagMutation

Mutation returns the TagMutation object of the builder.

func (*TagUpdateOne) RemoveSessionIDs

func (_u *TagUpdateOne) RemoveSessionIDs(ids ...int) *TagUpdateOne

RemoveSessionIDs removes the "sessions" edge to Session entities by IDs.

func (*TagUpdateOne) RemoveSessions

func (_u *TagUpdateOne) RemoveSessions(v ...*Session) *TagUpdateOne

RemoveSessions removes "sessions" edges to Session entities.

func (*TagUpdateOne) Save

func (_u *TagUpdateOne) Save(ctx context.Context) (*Tag, error)

Save executes the query and returns the updated Tag entity.

func (*TagUpdateOne) SaveX

func (_u *TagUpdateOne) SaveX(ctx context.Context) *Tag

SaveX is like Save, but panics if an error occurs.

func (*TagUpdateOne) Select

func (_u *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TagUpdateOne) SetName

func (_u *TagUpdateOne) SetName(v string) *TagUpdateOne

SetName sets the "name" field.

func (*TagUpdateOne) SetNillableName

func (_u *TagUpdateOne) SetNillableName(v *string) *TagUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*TagUpdateOne) Where

func (_u *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne

Where appends a list predicates to the TagUpdate builder.

type TagUpsert added in v1.12.0

type TagUpsert struct {
	*sql.UpdateSet
}

TagUpsert is the "OnConflict" setter.

func (*TagUpsert) SetName added in v1.12.0

func (u *TagUpsert) SetName(v string) *TagUpsert

SetName sets the "name" field.

func (*TagUpsert) UpdateName added in v1.12.0

func (u *TagUpsert) UpdateName() *TagUpsert

UpdateName sets the "name" field to the value that was provided on create.

type TagUpsertBulk added in v1.12.0

type TagUpsertBulk struct {
	// contains filtered or unexported fields
}

TagUpsertBulk is the builder for "upsert"-ing a bulk of Tag nodes.

func (*TagUpsertBulk) DoNothing added in v1.12.0

func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TagUpsertBulk) Exec added in v1.12.0

func (u *TagUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TagUpsertBulk) ExecX added in v1.12.0

func (u *TagUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TagUpsertBulk) Ignore added in v1.12.0

func (u *TagUpsertBulk) Ignore() *TagUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Tag.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TagUpsertBulk) SetName added in v1.12.0

func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk

SetName sets the "name" field.

func (*TagUpsertBulk) Update added in v1.12.0

func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk

Update allows overriding fields `UPDATE` values. See the TagCreateBulk.OnConflict documentation for more info.

func (*TagUpsertBulk) UpdateName added in v1.12.0

func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*TagUpsertBulk) UpdateNewValues added in v1.12.0

func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Tag.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type TagUpsertOne added in v1.12.0

type TagUpsertOne struct {
	// contains filtered or unexported fields
}

TagUpsertOne is the builder for "upsert"-ing

one Tag node.

func (*TagUpsertOne) DoNothing added in v1.12.0

func (u *TagUpsertOne) DoNothing() *TagUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TagUpsertOne) Exec added in v1.12.0

func (u *TagUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TagUpsertOne) ExecX added in v1.12.0

func (u *TagUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TagUpsertOne) ID added in v1.12.0

func (u *TagUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TagUpsertOne) IDX added in v1.12.0

func (u *TagUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*TagUpsertOne) Ignore added in v1.12.0

func (u *TagUpsertOne) Ignore() *TagUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Tag.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TagUpsertOne) SetName added in v1.12.0

func (u *TagUpsertOne) SetName(v string) *TagUpsertOne

SetName sets the "name" field.

func (*TagUpsertOne) Update added in v1.12.0

func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne

Update allows overriding fields `UPDATE` values. See the TagCreate.OnConflict documentation for more info.

func (*TagUpsertOne) UpdateName added in v1.12.0

func (u *TagUpsertOne) UpdateName() *TagUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*TagUpsertOne) UpdateNewValues added in v1.12.0

func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Tag.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type Tags

type Tags []*Tag

Tags is a parsable slice of Tag.

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 {

	// ApprovalRule is the client for interacting with the ApprovalRule builders.
	ApprovalRule *ApprovalRuleClient
	// ClassificationAnalytics is the client for interacting with the ClassificationAnalytics builders.
	ClassificationAnalytics *ClassificationAnalyticsClient
	// ClaudeMetadata is the client for interacting with the ClaudeMetadata builders.
	ClaudeMetadata *ClaudeMetadataClient
	// ClaudeSession is the client for interacting with the ClaudeSession builders.
	ClaudeSession *ClaudeSessionClient
	// DiffStats is the client for interacting with the DiffStats builders.
	DiffStats *DiffStatsClient
	// Session is the client for interacting with the Session builders.
	Session *SessionClient
	// Tag is the client for interacting with the Tag builders.
	Tag *TagClient
	// Worktree is the client for interacting with the Worktree builders.
	Worktree *WorktreeClient
	// 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 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.

type Worktree

type Worktree struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// RepoPath holds the value of the "repo_path" field.
	RepoPath string `json:"repo_path,omitempty"`
	// WorktreePath holds the value of the "worktree_path" field.
	WorktreePath string `json:"worktree_path,omitempty"`
	// SessionName holds the value of the "session_name" field.
	SessionName string `json:"session_name,omitempty"`
	// BranchName holds the value of the "branch_name" field.
	BranchName string `json:"branch_name,omitempty"`
	// BaseCommitSha holds the value of the "base_commit_sha" field.
	BaseCommitSha string `json:"base_commit_sha,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WorktreeQuery when eager-loading is set.
	Edges WorktreeEdges `json:"edges"`
	// contains filtered or unexported fields
}

Worktree is the model entity for the Worktree schema.

func (*Worktree) QuerySession

func (_m *Worktree) QuerySession() *SessionQuery

QuerySession queries the "session" edge of the Worktree entity.

func (*Worktree) String

func (_m *Worktree) String() string

String implements the fmt.Stringer.

func (*Worktree) Unwrap

func (_m *Worktree) Unwrap() *Worktree

Unwrap unwraps the Worktree 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 (*Worktree) Update

func (_m *Worktree) Update() *WorktreeUpdateOne

Update returns a builder for updating this Worktree. Note that you need to call Worktree.Unwrap() before calling this method if this Worktree was returned from a transaction, and the transaction was committed or rolled back.

func (*Worktree) Value

func (_m *Worktree) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Worktree. This includes values selected through modifiers, order, etc.

type WorktreeClient

type WorktreeClient struct {
	// contains filtered or unexported fields
}

WorktreeClient is a client for the Worktree schema.

func NewWorktreeClient

func NewWorktreeClient(c config) *WorktreeClient

NewWorktreeClient returns a client for the Worktree from the given config.

func (*WorktreeClient) Create

func (c *WorktreeClient) Create() *WorktreeCreate

Create returns a builder for creating a Worktree entity.

func (*WorktreeClient) CreateBulk

func (c *WorktreeClient) CreateBulk(builders ...*WorktreeCreate) *WorktreeCreateBulk

CreateBulk returns a builder for creating a bulk of Worktree entities.

func (*WorktreeClient) Delete

func (c *WorktreeClient) Delete() *WorktreeDelete

Delete returns a delete builder for Worktree.

func (*WorktreeClient) DeleteOne

func (c *WorktreeClient) DeleteOne(_m *Worktree) *WorktreeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WorktreeClient) DeleteOneID

func (c *WorktreeClient) DeleteOneID(id int) *WorktreeDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WorktreeClient) Get

func (c *WorktreeClient) Get(ctx context.Context, id int) (*Worktree, error)

Get returns a Worktree entity by its id.

func (*WorktreeClient) GetX

func (c *WorktreeClient) GetX(ctx context.Context, id int) *Worktree

GetX is like Get, but panics if an error occurs.

func (*WorktreeClient) Hooks

func (c *WorktreeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WorktreeClient) Intercept

func (c *WorktreeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `worktree.Intercept(f(g(h())))`.

func (*WorktreeClient) Interceptors

func (c *WorktreeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WorktreeClient) MapCreateBulk

func (c *WorktreeClient) MapCreateBulk(slice any, setFunc func(*WorktreeCreate, int)) *WorktreeCreateBulk

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 (*WorktreeClient) Query

func (c *WorktreeClient) Query() *WorktreeQuery

Query returns a query builder for Worktree.

func (*WorktreeClient) QuerySession

func (c *WorktreeClient) QuerySession(_m *Worktree) *SessionQuery

QuerySession queries the session edge of a Worktree.

func (*WorktreeClient) Update

func (c *WorktreeClient) Update() *WorktreeUpdate

Update returns an update builder for Worktree.

func (*WorktreeClient) UpdateOne

func (c *WorktreeClient) UpdateOne(_m *Worktree) *WorktreeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WorktreeClient) UpdateOneID

func (c *WorktreeClient) UpdateOneID(id int) *WorktreeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WorktreeClient) Use

func (c *WorktreeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `worktree.Hooks(f(g(h())))`.

type WorktreeCreate

type WorktreeCreate struct {
	// contains filtered or unexported fields
}

WorktreeCreate is the builder for creating a Worktree entity.

func (*WorktreeCreate) Exec

func (_c *WorktreeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorktreeCreate) ExecX

func (_c *WorktreeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeCreate) Mutation

func (_c *WorktreeCreate) Mutation() *WorktreeMutation

Mutation returns the WorktreeMutation object of the builder.

func (*WorktreeCreate) OnConflict added in v1.12.0

func (_c *WorktreeCreate) OnConflict(opts ...sql.ConflictOption) *WorktreeUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Worktree.Create().
	SetRepoPath(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.WorktreeUpsert) {
		SetRepoPath(v+v).
	}).
	Exec(ctx)

func (*WorktreeCreate) OnConflictColumns added in v1.12.0

func (_c *WorktreeCreate) OnConflictColumns(columns ...string) *WorktreeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Worktree.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorktreeCreate) Save

func (_c *WorktreeCreate) Save(ctx context.Context) (*Worktree, error)

Save creates the Worktree in the database.

func (*WorktreeCreate) SaveX

func (_c *WorktreeCreate) SaveX(ctx context.Context) *Worktree

SaveX calls Save and panics if Save returns an error.

func (*WorktreeCreate) SetBaseCommitSha

func (_c *WorktreeCreate) SetBaseCommitSha(v string) *WorktreeCreate

SetBaseCommitSha sets the "base_commit_sha" field.

func (*WorktreeCreate) SetBranchName

func (_c *WorktreeCreate) SetBranchName(v string) *WorktreeCreate

SetBranchName sets the "branch_name" field.

func (*WorktreeCreate) SetRepoPath

func (_c *WorktreeCreate) SetRepoPath(v string) *WorktreeCreate

SetRepoPath sets the "repo_path" field.

func (*WorktreeCreate) SetSession

func (_c *WorktreeCreate) SetSession(v *Session) *WorktreeCreate

SetSession sets the "session" edge to the Session entity.

func (*WorktreeCreate) SetSessionID

func (_c *WorktreeCreate) SetSessionID(id int) *WorktreeCreate

SetSessionID sets the "session" edge to the Session entity by ID.

func (*WorktreeCreate) SetSessionName

func (_c *WorktreeCreate) SetSessionName(v string) *WorktreeCreate

SetSessionName sets the "session_name" field.

func (*WorktreeCreate) SetWorktreePath

func (_c *WorktreeCreate) SetWorktreePath(v string) *WorktreeCreate

SetWorktreePath sets the "worktree_path" field.

type WorktreeCreateBulk

type WorktreeCreateBulk struct {
	// contains filtered or unexported fields
}

WorktreeCreateBulk is the builder for creating many Worktree entities in bulk.

func (*WorktreeCreateBulk) Exec

func (_c *WorktreeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorktreeCreateBulk) ExecX

func (_c *WorktreeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeCreateBulk) OnConflict added in v1.12.0

func (_c *WorktreeCreateBulk) OnConflict(opts ...sql.ConflictOption) *WorktreeUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Worktree.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.WorktreeUpsert) {
		SetRepoPath(v+v).
	}).
	Exec(ctx)

func (*WorktreeCreateBulk) OnConflictColumns added in v1.12.0

func (_c *WorktreeCreateBulk) OnConflictColumns(columns ...string) *WorktreeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Worktree.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*WorktreeCreateBulk) Save

func (_c *WorktreeCreateBulk) Save(ctx context.Context) ([]*Worktree, error)

Save creates the Worktree entities in the database.

func (*WorktreeCreateBulk) SaveX

func (_c *WorktreeCreateBulk) SaveX(ctx context.Context) []*Worktree

SaveX is like Save, but panics if an error occurs.

type WorktreeDelete

type WorktreeDelete struct {
	// contains filtered or unexported fields
}

WorktreeDelete is the builder for deleting a Worktree entity.

func (*WorktreeDelete) Exec

func (_d *WorktreeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WorktreeDelete) ExecX

func (_d *WorktreeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeDelete) Where

func (_d *WorktreeDelete) Where(ps ...predicate.Worktree) *WorktreeDelete

Where appends a list predicates to the WorktreeDelete builder.

type WorktreeDeleteOne

type WorktreeDeleteOne struct {
	// contains filtered or unexported fields
}

WorktreeDeleteOne is the builder for deleting a single Worktree entity.

func (*WorktreeDeleteOne) Exec

func (_d *WorktreeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WorktreeDeleteOne) ExecX

func (_d *WorktreeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeDeleteOne) Where

Where appends a list predicates to the WorktreeDelete builder.

type WorktreeEdges

type WorktreeEdges struct {
	// Session holds the value of the session edge.
	Session *Session `json:"session,omitempty"`
	// contains filtered or unexported fields
}

WorktreeEdges holds the relations/edges for other nodes in the graph.

func (WorktreeEdges) SessionOrErr

func (e WorktreeEdges) SessionOrErr() (*Session, error)

SessionOrErr returns the Session value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WorktreeGroupBy

type WorktreeGroupBy struct {
	// contains filtered or unexported fields
}

WorktreeGroupBy is the group-by builder for Worktree entities.

func (*WorktreeGroupBy) Aggregate

func (_g *WorktreeGroupBy) Aggregate(fns ...AggregateFunc) *WorktreeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WorktreeGroupBy) Bool

func (s *WorktreeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) BoolX

func (s *WorktreeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorktreeGroupBy) Bools

func (s *WorktreeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) BoolsX

func (s *WorktreeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorktreeGroupBy) Float64

func (s *WorktreeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) Float64X

func (s *WorktreeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorktreeGroupBy) Float64s

func (s *WorktreeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) Float64sX

func (s *WorktreeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorktreeGroupBy) Int

func (s *WorktreeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) IntX

func (s *WorktreeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorktreeGroupBy) Ints

func (s *WorktreeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) IntsX

func (s *WorktreeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorktreeGroupBy) Scan

func (_g *WorktreeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorktreeGroupBy) ScanX

func (s *WorktreeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorktreeGroupBy) String

func (s *WorktreeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) StringX

func (s *WorktreeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorktreeGroupBy) Strings

func (s *WorktreeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorktreeGroupBy) StringsX

func (s *WorktreeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorktreeMutation

type WorktreeMutation struct {
	// contains filtered or unexported fields
}

WorktreeMutation represents an operation that mutates the Worktree nodes in the graph.

func (*WorktreeMutation) AddField

func (m *WorktreeMutation) 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 (*WorktreeMutation) AddedEdges

func (m *WorktreeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WorktreeMutation) AddedField

func (m *WorktreeMutation) 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 (*WorktreeMutation) AddedFields

func (m *WorktreeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WorktreeMutation) AddedIDs

func (m *WorktreeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WorktreeMutation) BaseCommitSha

func (m *WorktreeMutation) BaseCommitSha() (r string, exists bool)

BaseCommitSha returns the value of the "base_commit_sha" field in the mutation.

func (*WorktreeMutation) BranchName

func (m *WorktreeMutation) BranchName() (r string, exists bool)

BranchName returns the value of the "branch_name" field in the mutation.

func (*WorktreeMutation) ClearEdge

func (m *WorktreeMutation) 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 (*WorktreeMutation) ClearField

func (m *WorktreeMutation) 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 (*WorktreeMutation) ClearSession

func (m *WorktreeMutation) ClearSession()

ClearSession clears the "session" edge to the Session entity.

func (*WorktreeMutation) ClearedEdges

func (m *WorktreeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WorktreeMutation) ClearedFields

func (m *WorktreeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WorktreeMutation) Client

func (m WorktreeMutation) 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 (*WorktreeMutation) EdgeCleared

func (m *WorktreeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WorktreeMutation) Field

func (m *WorktreeMutation) 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 (*WorktreeMutation) FieldCleared

func (m *WorktreeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WorktreeMutation) Fields

func (m *WorktreeMutation) 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 (*WorktreeMutation) ID

func (m *WorktreeMutation) 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 (*WorktreeMutation) IDs

func (m *WorktreeMutation) 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 (*WorktreeMutation) OldBaseCommitSha

func (m *WorktreeMutation) OldBaseCommitSha(ctx context.Context) (v string, err error)

OldBaseCommitSha returns the old "base_commit_sha" field's value of the Worktree entity. If the Worktree 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 (*WorktreeMutation) OldBranchName

func (m *WorktreeMutation) OldBranchName(ctx context.Context) (v string, err error)

OldBranchName returns the old "branch_name" field's value of the Worktree entity. If the Worktree 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 (*WorktreeMutation) OldField

func (m *WorktreeMutation) 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 (*WorktreeMutation) OldRepoPath

func (m *WorktreeMutation) OldRepoPath(ctx context.Context) (v string, err error)

OldRepoPath returns the old "repo_path" field's value of the Worktree entity. If the Worktree 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 (*WorktreeMutation) OldSessionName

func (m *WorktreeMutation) OldSessionName(ctx context.Context) (v string, err error)

OldSessionName returns the old "session_name" field's value of the Worktree entity. If the Worktree 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 (*WorktreeMutation) OldWorktreePath

func (m *WorktreeMutation) OldWorktreePath(ctx context.Context) (v string, err error)

OldWorktreePath returns the old "worktree_path" field's value of the Worktree entity. If the Worktree 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 (*WorktreeMutation) Op

func (m *WorktreeMutation) Op() Op

Op returns the operation name.

func (*WorktreeMutation) RemovedEdges

func (m *WorktreeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WorktreeMutation) RemovedIDs

func (m *WorktreeMutation) 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 (*WorktreeMutation) RepoPath

func (m *WorktreeMutation) RepoPath() (r string, exists bool)

RepoPath returns the value of the "repo_path" field in the mutation.

func (*WorktreeMutation) ResetBaseCommitSha

func (m *WorktreeMutation) ResetBaseCommitSha()

ResetBaseCommitSha resets all changes to the "base_commit_sha" field.

func (*WorktreeMutation) ResetBranchName

func (m *WorktreeMutation) ResetBranchName()

ResetBranchName resets all changes to the "branch_name" field.

func (*WorktreeMutation) ResetEdge

func (m *WorktreeMutation) 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 (*WorktreeMutation) ResetField

func (m *WorktreeMutation) 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 (*WorktreeMutation) ResetRepoPath

func (m *WorktreeMutation) ResetRepoPath()

ResetRepoPath resets all changes to the "repo_path" field.

func (*WorktreeMutation) ResetSession

func (m *WorktreeMutation) ResetSession()

ResetSession resets all changes to the "session" edge.

func (*WorktreeMutation) ResetSessionName

func (m *WorktreeMutation) ResetSessionName()

ResetSessionName resets all changes to the "session_name" field.

func (*WorktreeMutation) ResetWorktreePath

func (m *WorktreeMutation) ResetWorktreePath()

ResetWorktreePath resets all changes to the "worktree_path" field.

func (*WorktreeMutation) SessionCleared

func (m *WorktreeMutation) SessionCleared() bool

SessionCleared reports if the "session" edge to the Session entity was cleared.

func (*WorktreeMutation) SessionID

func (m *WorktreeMutation) SessionID() (id int, exists bool)

SessionID returns the "session" edge ID in the mutation.

func (*WorktreeMutation) SessionIDs

func (m *WorktreeMutation) SessionIDs() (ids []int)

SessionIDs returns the "session" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SessionID instead. It exists only for internal usage by the builders.

func (*WorktreeMutation) SessionName

func (m *WorktreeMutation) SessionName() (r string, exists bool)

SessionName returns the value of the "session_name" field in the mutation.

func (*WorktreeMutation) SetBaseCommitSha

func (m *WorktreeMutation) SetBaseCommitSha(s string)

SetBaseCommitSha sets the "base_commit_sha" field.

func (*WorktreeMutation) SetBranchName

func (m *WorktreeMutation) SetBranchName(s string)

SetBranchName sets the "branch_name" field.

func (*WorktreeMutation) SetField

func (m *WorktreeMutation) 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 (*WorktreeMutation) SetOp

func (m *WorktreeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WorktreeMutation) SetRepoPath

func (m *WorktreeMutation) SetRepoPath(s string)

SetRepoPath sets the "repo_path" field.

func (*WorktreeMutation) SetSessionID

func (m *WorktreeMutation) SetSessionID(id int)

SetSessionID sets the "session" edge to the Session entity by id.

func (*WorktreeMutation) SetSessionName

func (m *WorktreeMutation) SetSessionName(s string)

SetSessionName sets the "session_name" field.

func (*WorktreeMutation) SetWorktreePath

func (m *WorktreeMutation) SetWorktreePath(s string)

SetWorktreePath sets the "worktree_path" field.

func (WorktreeMutation) Tx

func (m WorktreeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WorktreeMutation) Type

func (m *WorktreeMutation) Type() string

Type returns the node type of this mutation (Worktree).

func (*WorktreeMutation) Where

func (m *WorktreeMutation) Where(ps ...predicate.Worktree)

Where appends a list predicates to the WorktreeMutation builder.

func (*WorktreeMutation) WhereP

func (m *WorktreeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WorktreeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*WorktreeMutation) WorktreePath

func (m *WorktreeMutation) WorktreePath() (r string, exists bool)

WorktreePath returns the value of the "worktree_path" field in the mutation.

type WorktreeQuery

type WorktreeQuery struct {
	// contains filtered or unexported fields
}

WorktreeQuery is the builder for querying Worktree entities.

func (*WorktreeQuery) Aggregate

func (_q *WorktreeQuery) Aggregate(fns ...AggregateFunc) *WorktreeSelect

Aggregate returns a WorktreeSelect configured with the given aggregations.

func (*WorktreeQuery) All

func (_q *WorktreeQuery) All(ctx context.Context) ([]*Worktree, error)

All executes the query and returns a list of Worktrees.

func (*WorktreeQuery) AllX

func (_q *WorktreeQuery) AllX(ctx context.Context) []*Worktree

AllX is like All, but panics if an error occurs.

func (*WorktreeQuery) Clone

func (_q *WorktreeQuery) Clone() *WorktreeQuery

Clone returns a duplicate of the WorktreeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WorktreeQuery) Count

func (_q *WorktreeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WorktreeQuery) CountX

func (_q *WorktreeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WorktreeQuery) Exist

func (_q *WorktreeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WorktreeQuery) ExistX

func (_q *WorktreeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WorktreeQuery) First

func (_q *WorktreeQuery) First(ctx context.Context) (*Worktree, error)

First returns the first Worktree entity from the query. Returns a *NotFoundError when no Worktree was found.

func (*WorktreeQuery) FirstID

func (_q *WorktreeQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Worktree ID from the query. Returns a *NotFoundError when no Worktree ID was found.

func (*WorktreeQuery) FirstIDX

func (_q *WorktreeQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*WorktreeQuery) FirstX

func (_q *WorktreeQuery) FirstX(ctx context.Context) *Worktree

FirstX is like First, but panics if an error occurs.

func (*WorktreeQuery) GroupBy

func (_q *WorktreeQuery) GroupBy(field string, fields ...string) *WorktreeGroupBy

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 {
	RepoPath string `json:"repo_path,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Worktree.Query().
	GroupBy(worktree.FieldRepoPath).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WorktreeQuery) IDs

func (_q *WorktreeQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Worktree IDs.

func (*WorktreeQuery) IDsX

func (_q *WorktreeQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*WorktreeQuery) Limit

func (_q *WorktreeQuery) Limit(limit int) *WorktreeQuery

Limit the number of records to be returned by this query.

func (*WorktreeQuery) Offset

func (_q *WorktreeQuery) Offset(offset int) *WorktreeQuery

Offset to start from.

func (*WorktreeQuery) Only

func (_q *WorktreeQuery) Only(ctx context.Context) (*Worktree, error)

Only returns a single Worktree entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Worktree entity is found. Returns a *NotFoundError when no Worktree entities are found.

func (*WorktreeQuery) OnlyID

func (_q *WorktreeQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Worktree ID in the query. Returns a *NotSingularError when more than one Worktree ID is found. Returns a *NotFoundError when no entities are found.

func (*WorktreeQuery) OnlyIDX

func (_q *WorktreeQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WorktreeQuery) OnlyX

func (_q *WorktreeQuery) OnlyX(ctx context.Context) *Worktree

OnlyX is like Only, but panics if an error occurs.

func (*WorktreeQuery) Order

Order specifies how the records should be ordered.

func (*WorktreeQuery) QuerySession

func (_q *WorktreeQuery) QuerySession() *SessionQuery

QuerySession chains the current query on the "session" edge.

func (*WorktreeQuery) Select

func (_q *WorktreeQuery) Select(fields ...string) *WorktreeSelect

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 {
	RepoPath string `json:"repo_path,omitempty"`
}

client.Worktree.Query().
	Select(worktree.FieldRepoPath).
	Scan(ctx, &v)

func (*WorktreeQuery) Unique

func (_q *WorktreeQuery) Unique(unique bool) *WorktreeQuery

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 (*WorktreeQuery) Where

func (_q *WorktreeQuery) Where(ps ...predicate.Worktree) *WorktreeQuery

Where adds a new predicate for the WorktreeQuery builder.

func (*WorktreeQuery) WithSession

func (_q *WorktreeQuery) WithSession(opts ...func(*SessionQuery)) *WorktreeQuery

WithSession tells the query-builder to eager-load the nodes that are connected to the "session" edge. The optional arguments are used to configure the query builder of the edge.

type WorktreeSelect

type WorktreeSelect struct {
	*WorktreeQuery
	// contains filtered or unexported fields
}

WorktreeSelect is the builder for selecting fields of Worktree entities.

func (*WorktreeSelect) Aggregate

func (_s *WorktreeSelect) Aggregate(fns ...AggregateFunc) *WorktreeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WorktreeSelect) Bool

func (s *WorktreeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) BoolX

func (s *WorktreeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WorktreeSelect) Bools

func (s *WorktreeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) BoolsX

func (s *WorktreeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WorktreeSelect) Float64

func (s *WorktreeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) Float64X

func (s *WorktreeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WorktreeSelect) Float64s

func (s *WorktreeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) Float64sX

func (s *WorktreeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WorktreeSelect) Int

func (s *WorktreeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) IntX

func (s *WorktreeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WorktreeSelect) Ints

func (s *WorktreeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) IntsX

func (s *WorktreeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WorktreeSelect) Scan

func (_s *WorktreeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WorktreeSelect) ScanX

func (s *WorktreeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WorktreeSelect) String

func (s *WorktreeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) StringX

func (s *WorktreeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WorktreeSelect) Strings

func (s *WorktreeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WorktreeSelect) StringsX

func (s *WorktreeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WorktreeUpdate

type WorktreeUpdate struct {
	// contains filtered or unexported fields
}

WorktreeUpdate is the builder for updating Worktree entities.

func (*WorktreeUpdate) ClearSession

func (_u *WorktreeUpdate) ClearSession() *WorktreeUpdate

ClearSession clears the "session" edge to the Session entity.

func (*WorktreeUpdate) Exec

func (_u *WorktreeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WorktreeUpdate) ExecX

func (_u *WorktreeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeUpdate) Mutation

func (_u *WorktreeUpdate) Mutation() *WorktreeMutation

Mutation returns the WorktreeMutation object of the builder.

func (*WorktreeUpdate) Save

func (_u *WorktreeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WorktreeUpdate) SaveX

func (_u *WorktreeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WorktreeUpdate) SetBaseCommitSha

func (_u *WorktreeUpdate) SetBaseCommitSha(v string) *WorktreeUpdate

SetBaseCommitSha sets the "base_commit_sha" field.

func (*WorktreeUpdate) SetBranchName

func (_u *WorktreeUpdate) SetBranchName(v string) *WorktreeUpdate

SetBranchName sets the "branch_name" field.

func (*WorktreeUpdate) SetNillableBaseCommitSha

func (_u *WorktreeUpdate) SetNillableBaseCommitSha(v *string) *WorktreeUpdate

SetNillableBaseCommitSha sets the "base_commit_sha" field if the given value is not nil.

func (*WorktreeUpdate) SetNillableBranchName

func (_u *WorktreeUpdate) SetNillableBranchName(v *string) *WorktreeUpdate

SetNillableBranchName sets the "branch_name" field if the given value is not nil.

func (*WorktreeUpdate) SetNillableRepoPath

func (_u *WorktreeUpdate) SetNillableRepoPath(v *string) *WorktreeUpdate

SetNillableRepoPath sets the "repo_path" field if the given value is not nil.

func (*WorktreeUpdate) SetNillableSessionName

func (_u *WorktreeUpdate) SetNillableSessionName(v *string) *WorktreeUpdate

SetNillableSessionName sets the "session_name" field if the given value is not nil.

func (*WorktreeUpdate) SetNillableWorktreePath

func (_u *WorktreeUpdate) SetNillableWorktreePath(v *string) *WorktreeUpdate

SetNillableWorktreePath sets the "worktree_path" field if the given value is not nil.

func (*WorktreeUpdate) SetRepoPath

func (_u *WorktreeUpdate) SetRepoPath(v string) *WorktreeUpdate

SetRepoPath sets the "repo_path" field.

func (*WorktreeUpdate) SetSession

func (_u *WorktreeUpdate) SetSession(v *Session) *WorktreeUpdate

SetSession sets the "session" edge to the Session entity.

func (*WorktreeUpdate) SetSessionID

func (_u *WorktreeUpdate) SetSessionID(id int) *WorktreeUpdate

SetSessionID sets the "session" edge to the Session entity by ID.

func (*WorktreeUpdate) SetSessionName

func (_u *WorktreeUpdate) SetSessionName(v string) *WorktreeUpdate

SetSessionName sets the "session_name" field.

func (*WorktreeUpdate) SetWorktreePath

func (_u *WorktreeUpdate) SetWorktreePath(v string) *WorktreeUpdate

SetWorktreePath sets the "worktree_path" field.

func (*WorktreeUpdate) Where

func (_u *WorktreeUpdate) Where(ps ...predicate.Worktree) *WorktreeUpdate

Where appends a list predicates to the WorktreeUpdate builder.

type WorktreeUpdateOne

type WorktreeUpdateOne struct {
	// contains filtered or unexported fields
}

WorktreeUpdateOne is the builder for updating a single Worktree entity.

func (*WorktreeUpdateOne) ClearSession

func (_u *WorktreeUpdateOne) ClearSession() *WorktreeUpdateOne

ClearSession clears the "session" edge to the Session entity.

func (*WorktreeUpdateOne) Exec

func (_u *WorktreeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WorktreeUpdateOne) ExecX

func (_u *WorktreeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeUpdateOne) Mutation

func (_u *WorktreeUpdateOne) Mutation() *WorktreeMutation

Mutation returns the WorktreeMutation object of the builder.

func (*WorktreeUpdateOne) Save

func (_u *WorktreeUpdateOne) Save(ctx context.Context) (*Worktree, error)

Save executes the query and returns the updated Worktree entity.

func (*WorktreeUpdateOne) SaveX

func (_u *WorktreeUpdateOne) SaveX(ctx context.Context) *Worktree

SaveX is like Save, but panics if an error occurs.

func (*WorktreeUpdateOne) Select

func (_u *WorktreeUpdateOne) Select(field string, fields ...string) *WorktreeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WorktreeUpdateOne) SetBaseCommitSha

func (_u *WorktreeUpdateOne) SetBaseCommitSha(v string) *WorktreeUpdateOne

SetBaseCommitSha sets the "base_commit_sha" field.

func (*WorktreeUpdateOne) SetBranchName

func (_u *WorktreeUpdateOne) SetBranchName(v string) *WorktreeUpdateOne

SetBranchName sets the "branch_name" field.

func (*WorktreeUpdateOne) SetNillableBaseCommitSha

func (_u *WorktreeUpdateOne) SetNillableBaseCommitSha(v *string) *WorktreeUpdateOne

SetNillableBaseCommitSha sets the "base_commit_sha" field if the given value is not nil.

func (*WorktreeUpdateOne) SetNillableBranchName

func (_u *WorktreeUpdateOne) SetNillableBranchName(v *string) *WorktreeUpdateOne

SetNillableBranchName sets the "branch_name" field if the given value is not nil.

func (*WorktreeUpdateOne) SetNillableRepoPath

func (_u *WorktreeUpdateOne) SetNillableRepoPath(v *string) *WorktreeUpdateOne

SetNillableRepoPath sets the "repo_path" field if the given value is not nil.

func (*WorktreeUpdateOne) SetNillableSessionName

func (_u *WorktreeUpdateOne) SetNillableSessionName(v *string) *WorktreeUpdateOne

SetNillableSessionName sets the "session_name" field if the given value is not nil.

func (*WorktreeUpdateOne) SetNillableWorktreePath

func (_u *WorktreeUpdateOne) SetNillableWorktreePath(v *string) *WorktreeUpdateOne

SetNillableWorktreePath sets the "worktree_path" field if the given value is not nil.

func (*WorktreeUpdateOne) SetRepoPath

func (_u *WorktreeUpdateOne) SetRepoPath(v string) *WorktreeUpdateOne

SetRepoPath sets the "repo_path" field.

func (*WorktreeUpdateOne) SetSession

func (_u *WorktreeUpdateOne) SetSession(v *Session) *WorktreeUpdateOne

SetSession sets the "session" edge to the Session entity.

func (*WorktreeUpdateOne) SetSessionID

func (_u *WorktreeUpdateOne) SetSessionID(id int) *WorktreeUpdateOne

SetSessionID sets the "session" edge to the Session entity by ID.

func (*WorktreeUpdateOne) SetSessionName

func (_u *WorktreeUpdateOne) SetSessionName(v string) *WorktreeUpdateOne

SetSessionName sets the "session_name" field.

func (*WorktreeUpdateOne) SetWorktreePath

func (_u *WorktreeUpdateOne) SetWorktreePath(v string) *WorktreeUpdateOne

SetWorktreePath sets the "worktree_path" field.

func (*WorktreeUpdateOne) Where

Where appends a list predicates to the WorktreeUpdate builder.

type WorktreeUpsert added in v1.12.0

type WorktreeUpsert struct {
	*sql.UpdateSet
}

WorktreeUpsert is the "OnConflict" setter.

func (*WorktreeUpsert) SetBaseCommitSha added in v1.12.0

func (u *WorktreeUpsert) SetBaseCommitSha(v string) *WorktreeUpsert

SetBaseCommitSha sets the "base_commit_sha" field.

func (*WorktreeUpsert) SetBranchName added in v1.12.0

func (u *WorktreeUpsert) SetBranchName(v string) *WorktreeUpsert

SetBranchName sets the "branch_name" field.

func (*WorktreeUpsert) SetRepoPath added in v1.12.0

func (u *WorktreeUpsert) SetRepoPath(v string) *WorktreeUpsert

SetRepoPath sets the "repo_path" field.

func (*WorktreeUpsert) SetSessionName added in v1.12.0

func (u *WorktreeUpsert) SetSessionName(v string) *WorktreeUpsert

SetSessionName sets the "session_name" field.

func (*WorktreeUpsert) SetWorktreePath added in v1.12.0

func (u *WorktreeUpsert) SetWorktreePath(v string) *WorktreeUpsert

SetWorktreePath sets the "worktree_path" field.

func (*WorktreeUpsert) UpdateBaseCommitSha added in v1.12.0

func (u *WorktreeUpsert) UpdateBaseCommitSha() *WorktreeUpsert

UpdateBaseCommitSha sets the "base_commit_sha" field to the value that was provided on create.

func (*WorktreeUpsert) UpdateBranchName added in v1.12.0

func (u *WorktreeUpsert) UpdateBranchName() *WorktreeUpsert

UpdateBranchName sets the "branch_name" field to the value that was provided on create.

func (*WorktreeUpsert) UpdateRepoPath added in v1.12.0

func (u *WorktreeUpsert) UpdateRepoPath() *WorktreeUpsert

UpdateRepoPath sets the "repo_path" field to the value that was provided on create.

func (*WorktreeUpsert) UpdateSessionName added in v1.12.0

func (u *WorktreeUpsert) UpdateSessionName() *WorktreeUpsert

UpdateSessionName sets the "session_name" field to the value that was provided on create.

func (*WorktreeUpsert) UpdateWorktreePath added in v1.12.0

func (u *WorktreeUpsert) UpdateWorktreePath() *WorktreeUpsert

UpdateWorktreePath sets the "worktree_path" field to the value that was provided on create.

type WorktreeUpsertBulk added in v1.12.0

type WorktreeUpsertBulk struct {
	// contains filtered or unexported fields
}

WorktreeUpsertBulk is the builder for "upsert"-ing a bulk of Worktree nodes.

func (*WorktreeUpsertBulk) DoNothing added in v1.12.0

func (u *WorktreeUpsertBulk) DoNothing() *WorktreeUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorktreeUpsertBulk) Exec added in v1.12.0

func (u *WorktreeUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WorktreeUpsertBulk) ExecX added in v1.12.0

func (u *WorktreeUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeUpsertBulk) Ignore added in v1.12.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Worktree.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*WorktreeUpsertBulk) SetBaseCommitSha added in v1.12.0

func (u *WorktreeUpsertBulk) SetBaseCommitSha(v string) *WorktreeUpsertBulk

SetBaseCommitSha sets the "base_commit_sha" field.

func (*WorktreeUpsertBulk) SetBranchName added in v1.12.0

func (u *WorktreeUpsertBulk) SetBranchName(v string) *WorktreeUpsertBulk

SetBranchName sets the "branch_name" field.

func (*WorktreeUpsertBulk) SetRepoPath added in v1.12.0

func (u *WorktreeUpsertBulk) SetRepoPath(v string) *WorktreeUpsertBulk

SetRepoPath sets the "repo_path" field.

func (*WorktreeUpsertBulk) SetSessionName added in v1.12.0

func (u *WorktreeUpsertBulk) SetSessionName(v string) *WorktreeUpsertBulk

SetSessionName sets the "session_name" field.

func (*WorktreeUpsertBulk) SetWorktreePath added in v1.12.0

func (u *WorktreeUpsertBulk) SetWorktreePath(v string) *WorktreeUpsertBulk

SetWorktreePath sets the "worktree_path" field.

func (*WorktreeUpsertBulk) Update added in v1.12.0

func (u *WorktreeUpsertBulk) Update(set func(*WorktreeUpsert)) *WorktreeUpsertBulk

Update allows overriding fields `UPDATE` values. See the WorktreeCreateBulk.OnConflict documentation for more info.

func (*WorktreeUpsertBulk) UpdateBaseCommitSha added in v1.12.0

func (u *WorktreeUpsertBulk) UpdateBaseCommitSha() *WorktreeUpsertBulk

UpdateBaseCommitSha sets the "base_commit_sha" field to the value that was provided on create.

func (*WorktreeUpsertBulk) UpdateBranchName added in v1.12.0

func (u *WorktreeUpsertBulk) UpdateBranchName() *WorktreeUpsertBulk

UpdateBranchName sets the "branch_name" field to the value that was provided on create.

func (*WorktreeUpsertBulk) UpdateNewValues added in v1.12.0

func (u *WorktreeUpsertBulk) UpdateNewValues() *WorktreeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Worktree.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*WorktreeUpsertBulk) UpdateRepoPath added in v1.12.0

func (u *WorktreeUpsertBulk) UpdateRepoPath() *WorktreeUpsertBulk

UpdateRepoPath sets the "repo_path" field to the value that was provided on create.

func (*WorktreeUpsertBulk) UpdateSessionName added in v1.12.0

func (u *WorktreeUpsertBulk) UpdateSessionName() *WorktreeUpsertBulk

UpdateSessionName sets the "session_name" field to the value that was provided on create.

func (*WorktreeUpsertBulk) UpdateWorktreePath added in v1.12.0

func (u *WorktreeUpsertBulk) UpdateWorktreePath() *WorktreeUpsertBulk

UpdateWorktreePath sets the "worktree_path" field to the value that was provided on create.

type WorktreeUpsertOne added in v1.12.0

type WorktreeUpsertOne struct {
	// contains filtered or unexported fields
}

WorktreeUpsertOne is the builder for "upsert"-ing

one Worktree node.

func (*WorktreeUpsertOne) DoNothing added in v1.12.0

func (u *WorktreeUpsertOne) DoNothing() *WorktreeUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*WorktreeUpsertOne) Exec added in v1.12.0

func (u *WorktreeUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*WorktreeUpsertOne) ExecX added in v1.12.0

func (u *WorktreeUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WorktreeUpsertOne) ID added in v1.12.0

func (u *WorktreeUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*WorktreeUpsertOne) IDX added in v1.12.0

func (u *WorktreeUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*WorktreeUpsertOne) Ignore added in v1.12.0

func (u *WorktreeUpsertOne) Ignore() *WorktreeUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Worktree.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*WorktreeUpsertOne) SetBaseCommitSha added in v1.12.0

func (u *WorktreeUpsertOne) SetBaseCommitSha(v string) *WorktreeUpsertOne

SetBaseCommitSha sets the "base_commit_sha" field.

func (*WorktreeUpsertOne) SetBranchName added in v1.12.0

func (u *WorktreeUpsertOne) SetBranchName(v string) *WorktreeUpsertOne

SetBranchName sets the "branch_name" field.

func (*WorktreeUpsertOne) SetRepoPath added in v1.12.0

func (u *WorktreeUpsertOne) SetRepoPath(v string) *WorktreeUpsertOne

SetRepoPath sets the "repo_path" field.

func (*WorktreeUpsertOne) SetSessionName added in v1.12.0

func (u *WorktreeUpsertOne) SetSessionName(v string) *WorktreeUpsertOne

SetSessionName sets the "session_name" field.

func (*WorktreeUpsertOne) SetWorktreePath added in v1.12.0

func (u *WorktreeUpsertOne) SetWorktreePath(v string) *WorktreeUpsertOne

SetWorktreePath sets the "worktree_path" field.

func (*WorktreeUpsertOne) Update added in v1.12.0

func (u *WorktreeUpsertOne) Update(set func(*WorktreeUpsert)) *WorktreeUpsertOne

Update allows overriding fields `UPDATE` values. See the WorktreeCreate.OnConflict documentation for more info.

func (*WorktreeUpsertOne) UpdateBaseCommitSha added in v1.12.0

func (u *WorktreeUpsertOne) UpdateBaseCommitSha() *WorktreeUpsertOne

UpdateBaseCommitSha sets the "base_commit_sha" field to the value that was provided on create.

func (*WorktreeUpsertOne) UpdateBranchName added in v1.12.0

func (u *WorktreeUpsertOne) UpdateBranchName() *WorktreeUpsertOne

UpdateBranchName sets the "branch_name" field to the value that was provided on create.

func (*WorktreeUpsertOne) UpdateNewValues added in v1.12.0

func (u *WorktreeUpsertOne) UpdateNewValues() *WorktreeUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Worktree.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*WorktreeUpsertOne) UpdateRepoPath added in v1.12.0

func (u *WorktreeUpsertOne) UpdateRepoPath() *WorktreeUpsertOne

UpdateRepoPath sets the "repo_path" field to the value that was provided on create.

func (*WorktreeUpsertOne) UpdateSessionName added in v1.12.0

func (u *WorktreeUpsertOne) UpdateSessionName() *WorktreeUpsertOne

UpdateSessionName sets the "session_name" field to the value that was provided on create.

func (*WorktreeUpsertOne) UpdateWorktreePath added in v1.12.0

func (u *WorktreeUpsertOne) UpdateWorktreePath() *WorktreeUpsertOne

UpdateWorktreePath sets the "worktree_path" field to the value that was provided on create.

type Worktrees

type Worktrees []*Worktree

Worktrees is a parsable slice of Worktree.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL