group

package
v1.36.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the group type in the database.
	Label = "group"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldOrganizationID holds the string denoting the organization_id field in the database.
	FieldOrganizationID = "organization_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"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldMemberCount holds the string denoting the member_count field in the database.
	FieldMemberCount = "member_count"
	// EdgeMembers holds the string denoting the members edge name in mutations.
	EdgeMembers = "members"
	// EdgeOrganization holds the string denoting the organization edge name in mutations.
	EdgeOrganization = "organization"
	// EdgeGroupUsers holds the string denoting the group_users edge name in mutations.
	EdgeGroupUsers = "group_users"
	// Table holds the table name of the group in the database.
	Table = "groups"
	// MembersTable is the table that holds the members relation/edge. The primary key declared below.
	MembersTable = "group_memberships"
	// MembersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	MembersInverseTable = "users"
	// OrganizationTable is the table that holds the organization relation/edge.
	OrganizationTable = "groups"
	// OrganizationInverseTable is the table name for the Organization entity.
	// It exists in this package in order to avoid circular dependency with the "organization" package.
	OrganizationInverseTable = "organizations"
	// OrganizationColumn is the table column denoting the organization relation/edge.
	OrganizationColumn = "organization_id"
	// GroupUsersTable is the table that holds the group_users relation/edge.
	GroupUsersTable = "group_memberships"
	// GroupUsersInverseTable is the table name for the GroupMembership entity.
	// It exists in this package in order to avoid circular dependency with the "groupmembership" package.
	GroupUsersInverseTable = "group_memberships"
	// GroupUsersColumn is the table column denoting the group_users relation/edge.
	GroupUsersColumn = "group_id"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// 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
	// DefaultMemberCount holds the default value on creation for the "member_count" field.
	DefaultMemberCount int
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for group fields.

View Source
var (
	// MembersPrimaryKey and MembersColumn2 are the table columns denoting the
	// primary key for the members relation (M2M).
	MembersPrimaryKey = []string{"group_id", "user_id"}
)

Functions

func And

func And(predicates ...predicate.Group) predicate.Group

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Group

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Group

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Group

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Group

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Group

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Group

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Group

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Group

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Group

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Group

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Group

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Group

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Group

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Group

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Group

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Group

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Group

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Group

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func Description

func Description(v string) predicate.Group

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Group

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Group

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Group

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Group

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Group

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Group

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Group

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Group

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Group

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Group

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Group

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Group

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Group

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Group

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Group

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasGroupUsers

func HasGroupUsers() predicate.Group

HasGroupUsers applies the HasEdge predicate on the "group_users" edge.

func HasGroupUsersWith

func HasGroupUsersWith(preds ...predicate.GroupMembership) predicate.Group

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

func HasMembers

func HasMembers() predicate.Group

HasMembers applies the HasEdge predicate on the "members" edge.

func HasMembersWith

func HasMembersWith(preds ...predicate.User) predicate.Group

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

func HasOrganization

func HasOrganization() predicate.Group

HasOrganization applies the HasEdge predicate on the "organization" edge.

func HasOrganizationWith

func HasOrganizationWith(preds ...predicate.Organization) predicate.Group

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

func ID

func ID(id uuid.UUID) predicate.Group

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Group

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Group

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Group

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Group

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Group

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Group

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Group

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Group

IDNotIn applies the NotIn predicate on the ID field.

func MemberCount added in v1.15.0

func MemberCount(v int) predicate.Group

MemberCount applies equality check predicate on the "member_count" field. It's identical to MemberCountEQ.

func MemberCountEQ added in v1.15.0

func MemberCountEQ(v int) predicate.Group

MemberCountEQ applies the EQ predicate on the "member_count" field.

func MemberCountGT added in v1.15.0

func MemberCountGT(v int) predicate.Group

MemberCountGT applies the GT predicate on the "member_count" field.

func MemberCountGTE added in v1.15.0

func MemberCountGTE(v int) predicate.Group

MemberCountGTE applies the GTE predicate on the "member_count" field.

func MemberCountIn added in v1.15.0

func MemberCountIn(vs ...int) predicate.Group

MemberCountIn applies the In predicate on the "member_count" field.

func MemberCountLT added in v1.15.0

func MemberCountLT(v int) predicate.Group

MemberCountLT applies the LT predicate on the "member_count" field.

func MemberCountLTE added in v1.15.0

func MemberCountLTE(v int) predicate.Group

MemberCountLTE applies the LTE predicate on the "member_count" field.

func MemberCountNEQ added in v1.15.0

func MemberCountNEQ(v int) predicate.Group

MemberCountNEQ applies the NEQ predicate on the "member_count" field.

func MemberCountNotIn added in v1.15.0

func MemberCountNotIn(vs ...int) predicate.Group

MemberCountNotIn applies the NotIn predicate on the "member_count" field.

func Name

func Name(v string) predicate.Group

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

func NameContains

func NameContains(v string) predicate.Group

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

func NameContainsFold

func NameContainsFold(v string) predicate.Group

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

func NameEQ

func NameEQ(v string) predicate.Group

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

func NameEqualFold

func NameEqualFold(v string) predicate.Group

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

func NameGT

func NameGT(v string) predicate.Group

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

func NameGTE

func NameGTE(v string) predicate.Group

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Group

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Group

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Group

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

func NameLTE

func NameLTE(v string) predicate.Group

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

func NameNEQ

func NameNEQ(v string) predicate.Group

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

func NameNotIn

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

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.Group) predicate.Group

Or groups predicates with the OR operator between them.

func OrganizationID

func OrganizationID(v uuid.UUID) predicate.Group

OrganizationID applies equality check predicate on the "organization_id" field. It's identical to OrganizationIDEQ.

func OrganizationIDEQ

func OrganizationIDEQ(v uuid.UUID) predicate.Group

OrganizationIDEQ applies the EQ predicate on the "organization_id" field.

func OrganizationIDIn

func OrganizationIDIn(vs ...uuid.UUID) predicate.Group

OrganizationIDIn applies the In predicate on the "organization_id" field.

func OrganizationIDNEQ

func OrganizationIDNEQ(v uuid.UUID) predicate.Group

OrganizationIDNEQ applies the NEQ predicate on the "organization_id" field.

func OrganizationIDNotIn

func OrganizationIDNotIn(vs ...uuid.UUID) predicate.Group

OrganizationIDNotIn applies the NotIn predicate on the "organization_id" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Group

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Group

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Group

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Group

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Group

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Group

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Group

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

func UpdatedAtNotIn

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

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).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Group queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByDescription

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

ByDescription orders the results by the description field.

func ByGroupUsers

func ByGroupUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByGroupUsers orders the results by group_users terms.

func ByGroupUsersCount

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

ByGroupUsersCount orders the results by group_users count.

func ByID

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

ByID orders the results by the id field.

func ByMemberCount added in v1.15.0

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

ByMemberCount orders the results by the member_count field.

func ByMembers

func ByMembers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMembers orders the results by members terms.

func ByMembersCount

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

ByMembersCount orders the results by members count.

func ByName

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

ByName orders the results by the name field.

func ByOrganizationField

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

ByOrganizationField orders the results by organization field.

func ByOrganizationID

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

ByOrganizationID orders the results by the organization_id field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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