Help us shape the future of Go! Take the 2026 Go Developer Survey

segment

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the segment type in the database.
	Label = "segment"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldWorkspaceID holds the string denoting the workspace_id field in the database.
	FieldWorkspaceID = "workspace_id"
	// FieldDiscardedAt holds the string denoting the discarded_at field in the database.
	FieldDiscardedAt = "discarded_at"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldCondition holds the string denoting the condition field in the database.
	FieldCondition = "condition"
	// EdgeWorkspace holds the string denoting the workspace edge name in mutations.
	EdgeWorkspace = "workspace"
	// Table holds the table name of the segment in the database.
	Table = "segments"
	// WorkspaceTable is the table that holds the workspace relation/edge.
	WorkspaceTable = "segments"
	// WorkspaceInverseTable is the table name for the Workspace entity.
	// It exists in this package in order to avoid circular dependency with the "workspace" package.
	WorkspaceInverseTable = "workspaces"
	// WorkspaceColumn is the table column denoting the workspace relation/edge.
	WorkspaceColumn = "workspace_id"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
)

Columns holds all SQL columns for segment fields.

Functions

func And

func And(predicates ...predicate.Segment) predicate.Segment

And groups predicates with the AND operator between them.

func Condition

func Condition(v string) predicate.Segment

Condition applies equality check predicate on the "condition" field. It's identical to ConditionEQ.

func ConditionContains

func ConditionContains(v string) predicate.Segment

ConditionContains applies the Contains predicate on the "condition" field.

func ConditionContainsFold

func ConditionContainsFold(v string) predicate.Segment

ConditionContainsFold applies the ContainsFold predicate on the "condition" field.

func ConditionEQ

func ConditionEQ(v string) predicate.Segment

ConditionEQ applies the EQ predicate on the "condition" field.

func ConditionEqualFold

func ConditionEqualFold(v string) predicate.Segment

ConditionEqualFold applies the EqualFold predicate on the "condition" field.

func ConditionGT

func ConditionGT(v string) predicate.Segment

ConditionGT applies the GT predicate on the "condition" field.

func ConditionGTE

func ConditionGTE(v string) predicate.Segment

ConditionGTE applies the GTE predicate on the "condition" field.

func ConditionHasPrefix

func ConditionHasPrefix(v string) predicate.Segment

ConditionHasPrefix applies the HasPrefix predicate on the "condition" field.

func ConditionHasSuffix

func ConditionHasSuffix(v string) predicate.Segment

ConditionHasSuffix applies the HasSuffix predicate on the "condition" field.

func ConditionIn

func ConditionIn(vs ...string) predicate.Segment

ConditionIn applies the In predicate on the "condition" field.

func ConditionIsNil

func ConditionIsNil() predicate.Segment

ConditionIsNil applies the IsNil predicate on the "condition" field.

func ConditionLT

func ConditionLT(v string) predicate.Segment

ConditionLT applies the LT predicate on the "condition" field.

func ConditionLTE

func ConditionLTE(v string) predicate.Segment

ConditionLTE applies the LTE predicate on the "condition" field.

func ConditionNEQ

func ConditionNEQ(v string) predicate.Segment

ConditionNEQ applies the NEQ predicate on the "condition" field.

func ConditionNotIn

func ConditionNotIn(vs ...string) predicate.Segment

ConditionNotIn applies the NotIn predicate on the "condition" field.

func ConditionNotNil

func ConditionNotNil() predicate.Segment

ConditionNotNil applies the NotNil predicate on the "condition" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Segment

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Segment

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Segment

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Segment

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Segment

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Segment

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Segment

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Segment

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Segment

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func DiscardedAt

func DiscardedAt(v time.Time) predicate.Segment

DiscardedAt applies equality check predicate on the "discarded_at" field. It's identical to DiscardedAtEQ.

func DiscardedAtEQ

func DiscardedAtEQ(v time.Time) predicate.Segment

DiscardedAtEQ applies the EQ predicate on the "discarded_at" field.

func DiscardedAtGT

func DiscardedAtGT(v time.Time) predicate.Segment

DiscardedAtGT applies the GT predicate on the "discarded_at" field.

func DiscardedAtGTE

func DiscardedAtGTE(v time.Time) predicate.Segment

DiscardedAtGTE applies the GTE predicate on the "discarded_at" field.

func DiscardedAtIn

func DiscardedAtIn(vs ...time.Time) predicate.Segment

DiscardedAtIn applies the In predicate on the "discarded_at" field.

func DiscardedAtIsNil

func DiscardedAtIsNil() predicate.Segment

DiscardedAtIsNil applies the IsNil predicate on the "discarded_at" field.

func DiscardedAtLT

func DiscardedAtLT(v time.Time) predicate.Segment

DiscardedAtLT applies the LT predicate on the "discarded_at" field.

func DiscardedAtLTE

func DiscardedAtLTE(v time.Time) predicate.Segment

DiscardedAtLTE applies the LTE predicate on the "discarded_at" field.

func DiscardedAtNEQ

func DiscardedAtNEQ(v time.Time) predicate.Segment

DiscardedAtNEQ applies the NEQ predicate on the "discarded_at" field.

func DiscardedAtNotIn

func DiscardedAtNotIn(vs ...time.Time) predicate.Segment

DiscardedAtNotIn applies the NotIn predicate on the "discarded_at" field.

func DiscardedAtNotNil

func DiscardedAtNotNil() predicate.Segment

DiscardedAtNotNil applies the NotNil predicate on the "discarded_at" field.

func HasWorkspace

func HasWorkspace() predicate.Segment

HasWorkspace applies the HasEdge predicate on the "workspace" edge.

func HasWorkspaceWith

func HasWorkspaceWith(preds ...predicate.Workspace) predicate.Segment

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

func ID

func ID(id int64) predicate.Segment

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Segment

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Segment

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Segment

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Segment

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Segment

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Segment

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Segment

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Segment

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Segment

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Segment

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Segment

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Segment

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Segment

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Segment

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Segment

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Segment

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Segment

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Segment

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Segment

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Segment

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Segment

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Segment

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Segment) predicate.Segment

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Segment

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Segment

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Segment

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Segment

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Segment

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Segment

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Segment

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Segment

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Segment

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

func WorkspaceID

func WorkspaceID(v int64) predicate.Segment

WorkspaceID applies equality check predicate on the "workspace_id" field. It's identical to WorkspaceIDEQ.

func WorkspaceIDEQ

func WorkspaceIDEQ(v int64) predicate.Segment

WorkspaceIDEQ applies the EQ predicate on the "workspace_id" field.

func WorkspaceIDIn

func WorkspaceIDIn(vs ...int64) predicate.Segment

WorkspaceIDIn applies the In predicate on the "workspace_id" field.

func WorkspaceIDNEQ

func WorkspaceIDNEQ(v int64) predicate.Segment

WorkspaceIDNEQ applies the NEQ predicate on the "workspace_id" field.

func WorkspaceIDNotIn

func WorkspaceIDNotIn(vs ...int64) predicate.Segment

WorkspaceIDNotIn applies the NotIn predicate on the "workspace_id" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Segment queries.

func ByCondition

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

ByCondition orders the results by the condition field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDiscardedAt

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

ByDiscardedAt orders the results by the discarded_at field.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByWorkspaceField

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

ByWorkspaceField orders the results by workspace field.

func ByWorkspaceID

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

ByWorkspaceID orders the results by the workspace_id field.

Jump to

Keyboard shortcuts

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