ent

package
v0.0.0-...-fa61aa1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: AGPL-3.0 Imports: 24 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.
	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 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) 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) 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 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) 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) 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 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
	// 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().
	ClaudeMetadata.
	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) 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) 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 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) 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) 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 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) 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) 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 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 {

	// 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) 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) 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 Worktrees

type Worktrees []*Worktree

Worktrees is a parsable slice of Worktree.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL