worktree

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the worktree type in the database.
	Label = "worktree"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldRepoPath holds the string denoting the repo_path field in the database.
	FieldRepoPath = "repo_path"
	// FieldWorktreePath holds the string denoting the worktree_path field in the database.
	FieldWorktreePath = "worktree_path"
	// FieldSessionName holds the string denoting the session_name field in the database.
	FieldSessionName = "session_name"
	// FieldBranchName holds the string denoting the branch_name field in the database.
	FieldBranchName = "branch_name"
	// FieldBaseCommitSha holds the string denoting the base_commit_sha field in the database.
	FieldBaseCommitSha = "base_commit_sha"
	// EdgeSession holds the string denoting the session edge name in mutations.
	EdgeSession = "session"
	// Table holds the table name of the worktree in the database.
	Table = "worktrees"
	// SessionTable is the table that holds the session relation/edge.
	SessionTable = "worktrees"
	// SessionInverseTable is the table name for the Session entity.
	// It exists in this package in order to avoid circular dependency with the "session" package.
	SessionInverseTable = "sessions"
	// SessionColumn is the table column denoting the session relation/edge.
	SessionColumn = "session_worktree"
)

Variables

View Source
var (
	// RepoPathValidator is a validator for the "repo_path" field. It is called by the builders before save.
	RepoPathValidator func(string) error
	// WorktreePathValidator is a validator for the "worktree_path" field. It is called by the builders before save.
	WorktreePathValidator func(string) error
	// SessionNameValidator is a validator for the "session_name" field. It is called by the builders before save.
	SessionNameValidator func(string) error
	// BranchNameValidator is a validator for the "branch_name" field. It is called by the builders before save.
	BranchNameValidator func(string) error
	// BaseCommitShaValidator is a validator for the "base_commit_sha" field. It is called by the builders before save.
	BaseCommitShaValidator func(string) error
)

Columns holds all SQL columns for worktree fields.

View Source
var ForeignKeys = []string{
	"session_worktree",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "worktrees" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Worktree) predicate.Worktree

And groups predicates with the AND operator between them.

func BaseCommitSha

func BaseCommitSha(v string) predicate.Worktree

BaseCommitSha applies equality check predicate on the "base_commit_sha" field. It's identical to BaseCommitShaEQ.

func BaseCommitShaContains

func BaseCommitShaContains(v string) predicate.Worktree

BaseCommitShaContains applies the Contains predicate on the "base_commit_sha" field.

func BaseCommitShaContainsFold

func BaseCommitShaContainsFold(v string) predicate.Worktree

BaseCommitShaContainsFold applies the ContainsFold predicate on the "base_commit_sha" field.

func BaseCommitShaEQ

func BaseCommitShaEQ(v string) predicate.Worktree

BaseCommitShaEQ applies the EQ predicate on the "base_commit_sha" field.

func BaseCommitShaEqualFold

func BaseCommitShaEqualFold(v string) predicate.Worktree

BaseCommitShaEqualFold applies the EqualFold predicate on the "base_commit_sha" field.

func BaseCommitShaGT

func BaseCommitShaGT(v string) predicate.Worktree

BaseCommitShaGT applies the GT predicate on the "base_commit_sha" field.

func BaseCommitShaGTE

func BaseCommitShaGTE(v string) predicate.Worktree

BaseCommitShaGTE applies the GTE predicate on the "base_commit_sha" field.

func BaseCommitShaHasPrefix

func BaseCommitShaHasPrefix(v string) predicate.Worktree

BaseCommitShaHasPrefix applies the HasPrefix predicate on the "base_commit_sha" field.

func BaseCommitShaHasSuffix

func BaseCommitShaHasSuffix(v string) predicate.Worktree

BaseCommitShaHasSuffix applies the HasSuffix predicate on the "base_commit_sha" field.

func BaseCommitShaIn

func BaseCommitShaIn(vs ...string) predicate.Worktree

BaseCommitShaIn applies the In predicate on the "base_commit_sha" field.

func BaseCommitShaLT

func BaseCommitShaLT(v string) predicate.Worktree

BaseCommitShaLT applies the LT predicate on the "base_commit_sha" field.

func BaseCommitShaLTE

func BaseCommitShaLTE(v string) predicate.Worktree

BaseCommitShaLTE applies the LTE predicate on the "base_commit_sha" field.

func BaseCommitShaNEQ

func BaseCommitShaNEQ(v string) predicate.Worktree

BaseCommitShaNEQ applies the NEQ predicate on the "base_commit_sha" field.

func BaseCommitShaNotIn

func BaseCommitShaNotIn(vs ...string) predicate.Worktree

BaseCommitShaNotIn applies the NotIn predicate on the "base_commit_sha" field.

func BranchName

func BranchName(v string) predicate.Worktree

BranchName applies equality check predicate on the "branch_name" field. It's identical to BranchNameEQ.

func BranchNameContains

func BranchNameContains(v string) predicate.Worktree

BranchNameContains applies the Contains predicate on the "branch_name" field.

func BranchNameContainsFold

func BranchNameContainsFold(v string) predicate.Worktree

BranchNameContainsFold applies the ContainsFold predicate on the "branch_name" field.

func BranchNameEQ

func BranchNameEQ(v string) predicate.Worktree

BranchNameEQ applies the EQ predicate on the "branch_name" field.

func BranchNameEqualFold

func BranchNameEqualFold(v string) predicate.Worktree

BranchNameEqualFold applies the EqualFold predicate on the "branch_name" field.

func BranchNameGT

func BranchNameGT(v string) predicate.Worktree

BranchNameGT applies the GT predicate on the "branch_name" field.

func BranchNameGTE

func BranchNameGTE(v string) predicate.Worktree

BranchNameGTE applies the GTE predicate on the "branch_name" field.

func BranchNameHasPrefix

func BranchNameHasPrefix(v string) predicate.Worktree

BranchNameHasPrefix applies the HasPrefix predicate on the "branch_name" field.

func BranchNameHasSuffix

func BranchNameHasSuffix(v string) predicate.Worktree

BranchNameHasSuffix applies the HasSuffix predicate on the "branch_name" field.

func BranchNameIn

func BranchNameIn(vs ...string) predicate.Worktree

BranchNameIn applies the In predicate on the "branch_name" field.

func BranchNameLT

func BranchNameLT(v string) predicate.Worktree

BranchNameLT applies the LT predicate on the "branch_name" field.

func BranchNameLTE

func BranchNameLTE(v string) predicate.Worktree

BranchNameLTE applies the LTE predicate on the "branch_name" field.

func BranchNameNEQ

func BranchNameNEQ(v string) predicate.Worktree

BranchNameNEQ applies the NEQ predicate on the "branch_name" field.

func BranchNameNotIn

func BranchNameNotIn(vs ...string) predicate.Worktree

BranchNameNotIn applies the NotIn predicate on the "branch_name" field.

func HasSession

func HasSession() predicate.Worktree

HasSession applies the HasEdge predicate on the "session" edge.

func HasSessionWith

func HasSessionWith(preds ...predicate.Session) predicate.Worktree

HasSessionWith applies the HasEdge predicate on the "session" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Worktree

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Worktree

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Worktree

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Worktree

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Worktree

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Worktree

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Worktree

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Worktree

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Worktree

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Worktree) predicate.Worktree

Or groups predicates with the OR operator between them.

func RepoPath

func RepoPath(v string) predicate.Worktree

RepoPath applies equality check predicate on the "repo_path" field. It's identical to RepoPathEQ.

func RepoPathContains

func RepoPathContains(v string) predicate.Worktree

RepoPathContains applies the Contains predicate on the "repo_path" field.

func RepoPathContainsFold

func RepoPathContainsFold(v string) predicate.Worktree

RepoPathContainsFold applies the ContainsFold predicate on the "repo_path" field.

func RepoPathEQ

func RepoPathEQ(v string) predicate.Worktree

RepoPathEQ applies the EQ predicate on the "repo_path" field.

func RepoPathEqualFold

func RepoPathEqualFold(v string) predicate.Worktree

RepoPathEqualFold applies the EqualFold predicate on the "repo_path" field.

func RepoPathGT

func RepoPathGT(v string) predicate.Worktree

RepoPathGT applies the GT predicate on the "repo_path" field.

func RepoPathGTE

func RepoPathGTE(v string) predicate.Worktree

RepoPathGTE applies the GTE predicate on the "repo_path" field.

func RepoPathHasPrefix

func RepoPathHasPrefix(v string) predicate.Worktree

RepoPathHasPrefix applies the HasPrefix predicate on the "repo_path" field.

func RepoPathHasSuffix

func RepoPathHasSuffix(v string) predicate.Worktree

RepoPathHasSuffix applies the HasSuffix predicate on the "repo_path" field.

func RepoPathIn

func RepoPathIn(vs ...string) predicate.Worktree

RepoPathIn applies the In predicate on the "repo_path" field.

func RepoPathLT

func RepoPathLT(v string) predicate.Worktree

RepoPathLT applies the LT predicate on the "repo_path" field.

func RepoPathLTE

func RepoPathLTE(v string) predicate.Worktree

RepoPathLTE applies the LTE predicate on the "repo_path" field.

func RepoPathNEQ

func RepoPathNEQ(v string) predicate.Worktree

RepoPathNEQ applies the NEQ predicate on the "repo_path" field.

func RepoPathNotIn

func RepoPathNotIn(vs ...string) predicate.Worktree

RepoPathNotIn applies the NotIn predicate on the "repo_path" field.

func SessionName

func SessionName(v string) predicate.Worktree

SessionName applies equality check predicate on the "session_name" field. It's identical to SessionNameEQ.

func SessionNameContains

func SessionNameContains(v string) predicate.Worktree

SessionNameContains applies the Contains predicate on the "session_name" field.

func SessionNameContainsFold

func SessionNameContainsFold(v string) predicate.Worktree

SessionNameContainsFold applies the ContainsFold predicate on the "session_name" field.

func SessionNameEQ

func SessionNameEQ(v string) predicate.Worktree

SessionNameEQ applies the EQ predicate on the "session_name" field.

func SessionNameEqualFold

func SessionNameEqualFold(v string) predicate.Worktree

SessionNameEqualFold applies the EqualFold predicate on the "session_name" field.

func SessionNameGT

func SessionNameGT(v string) predicate.Worktree

SessionNameGT applies the GT predicate on the "session_name" field.

func SessionNameGTE

func SessionNameGTE(v string) predicate.Worktree

SessionNameGTE applies the GTE predicate on the "session_name" field.

func SessionNameHasPrefix

func SessionNameHasPrefix(v string) predicate.Worktree

SessionNameHasPrefix applies the HasPrefix predicate on the "session_name" field.

func SessionNameHasSuffix

func SessionNameHasSuffix(v string) predicate.Worktree

SessionNameHasSuffix applies the HasSuffix predicate on the "session_name" field.

func SessionNameIn

func SessionNameIn(vs ...string) predicate.Worktree

SessionNameIn applies the In predicate on the "session_name" field.

func SessionNameLT

func SessionNameLT(v string) predicate.Worktree

SessionNameLT applies the LT predicate on the "session_name" field.

func SessionNameLTE

func SessionNameLTE(v string) predicate.Worktree

SessionNameLTE applies the LTE predicate on the "session_name" field.

func SessionNameNEQ

func SessionNameNEQ(v string) predicate.Worktree

SessionNameNEQ applies the NEQ predicate on the "session_name" field.

func SessionNameNotIn

func SessionNameNotIn(vs ...string) predicate.Worktree

SessionNameNotIn applies the NotIn predicate on the "session_name" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func WorktreePath

func WorktreePath(v string) predicate.Worktree

WorktreePath applies equality check predicate on the "worktree_path" field. It's identical to WorktreePathEQ.

func WorktreePathContains

func WorktreePathContains(v string) predicate.Worktree

WorktreePathContains applies the Contains predicate on the "worktree_path" field.

func WorktreePathContainsFold

func WorktreePathContainsFold(v string) predicate.Worktree

WorktreePathContainsFold applies the ContainsFold predicate on the "worktree_path" field.

func WorktreePathEQ

func WorktreePathEQ(v string) predicate.Worktree

WorktreePathEQ applies the EQ predicate on the "worktree_path" field.

func WorktreePathEqualFold

func WorktreePathEqualFold(v string) predicate.Worktree

WorktreePathEqualFold applies the EqualFold predicate on the "worktree_path" field.

func WorktreePathGT

func WorktreePathGT(v string) predicate.Worktree

WorktreePathGT applies the GT predicate on the "worktree_path" field.

func WorktreePathGTE

func WorktreePathGTE(v string) predicate.Worktree

WorktreePathGTE applies the GTE predicate on the "worktree_path" field.

func WorktreePathHasPrefix

func WorktreePathHasPrefix(v string) predicate.Worktree

WorktreePathHasPrefix applies the HasPrefix predicate on the "worktree_path" field.

func WorktreePathHasSuffix

func WorktreePathHasSuffix(v string) predicate.Worktree

WorktreePathHasSuffix applies the HasSuffix predicate on the "worktree_path" field.

func WorktreePathIn

func WorktreePathIn(vs ...string) predicate.Worktree

WorktreePathIn applies the In predicate on the "worktree_path" field.

func WorktreePathLT

func WorktreePathLT(v string) predicate.Worktree

WorktreePathLT applies the LT predicate on the "worktree_path" field.

func WorktreePathLTE

func WorktreePathLTE(v string) predicate.Worktree

WorktreePathLTE applies the LTE predicate on the "worktree_path" field.

func WorktreePathNEQ

func WorktreePathNEQ(v string) predicate.Worktree

WorktreePathNEQ applies the NEQ predicate on the "worktree_path" field.

func WorktreePathNotIn

func WorktreePathNotIn(vs ...string) predicate.Worktree

WorktreePathNotIn applies the NotIn predicate on the "worktree_path" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Worktree queries.

func ByBaseCommitSha

func ByBaseCommitSha(opts ...sql.OrderTermOption) OrderOption

ByBaseCommitSha orders the results by the base_commit_sha field.

func ByBranchName

func ByBranchName(opts ...sql.OrderTermOption) OrderOption

ByBranchName orders the results by the branch_name field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByRepoPath

func ByRepoPath(opts ...sql.OrderTermOption) OrderOption

ByRepoPath orders the results by the repo_path field.

func BySessionField

func BySessionField(field string, opts ...sql.OrderTermOption) OrderOption

BySessionField orders the results by session field.

func BySessionName

func BySessionName(opts ...sql.OrderTermOption) OrderOption

BySessionName orders the results by the session_name field.

func ByWorktreePath

func ByWorktreePath(opts ...sql.OrderTermOption) OrderOption

ByWorktreePath orders the results by the worktree_path field.

Jump to

Keyboard shortcuts

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