topic

package
v0.13.52 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the topic type in the database.
	Label = "topic"
	// 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"
	// FieldCreatedAt holds the string denoting the createdat field in the database.
	FieldCreatedAt = "created_at"
	// FieldLive holds the string denoting the live field in the database.
	FieldLive = "live"
	// FieldDeletedAt holds the string denoting the deletedat field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldLabels holds the string denoting the labels field in the database.
	FieldLabels = "labels"
	// EdgeSubscriptions holds the string denoting the subscriptions edge name in mutations.
	EdgeSubscriptions = "subscriptions"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// Table holds the table name of the topic in the database.
	Table = "topics"
	// SubscriptionsTable is the table that holds the subscriptions relation/edge.
	SubscriptionsTable = "subscriptions"
	// SubscriptionsInverseTable is the table name for the Subscription entity.
	// It exists in this package in order to avoid circular dependency with the "subscription" package.
	SubscriptionsInverseTable = "subscriptions"
	// SubscriptionsColumn is the table column denoting the subscriptions relation/edge.
	SubscriptionsColumn = "topic_id"
	// MessagesTable is the table that holds the messages relation/edge.
	MessagesTable = "messages"
	// MessagesInverseTable is the table name for the Message entity.
	// It exists in this package in order to avoid circular dependency with the "message" package.
	MessagesInverseTable = "messages"
	// MessagesColumn is the table column denoting the messages relation/edge.
	MessagesColumn = "topic_id"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// 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 "createdAt" field.
	DefaultCreatedAt func() time.Time
	// DefaultLive holds the default value on creation for the "live" field.
	DefaultLive bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "go.6river.tech/mmmbbb/ent/runtime"

Columns holds all SQL columns for topic fields.

Functions

func And

func And(predicates ...predicate.Topic) predicate.Topic

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Topic

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Topic

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Topic

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Topic

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Topic

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Topic

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Topic

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Topic

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Topic

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Topic

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Topic

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Topic

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Topic

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Topic

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Topic

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Topic

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

func HasMessages

func HasMessages() predicate.Topic

HasMessages applies the HasEdge predicate on the "messages" edge.

func HasMessagesWith

func HasMessagesWith(preds ...predicate.Message) predicate.Topic

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

func HasSubscriptions

func HasSubscriptions() predicate.Topic

HasSubscriptions applies the HasEdge predicate on the "subscriptions" edge.

func HasSubscriptionsWith

func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.Topic

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

func ID

func ID(id uuid.UUID) predicate.Topic

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Topic

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Topic

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Topic

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Topic

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Topic

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Topic

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func LabelsIsNil

func LabelsIsNil() predicate.Topic

LabelsIsNil applies the IsNil predicate on the "labels" field.

func LabelsNotNil

func LabelsNotNil() predicate.Topic

LabelsNotNil applies the NotNil predicate on the "labels" field.

func Live

func Live(v bool) predicate.Topic

Live applies equality check predicate on the "live" field. It's identical to LiveEQ.

func LiveEQ

func LiveEQ(v bool) predicate.Topic

LiveEQ applies the EQ predicate on the "live" field.

func LiveIsNil

func LiveIsNil() predicate.Topic

LiveIsNil applies the IsNil predicate on the "live" field.

func LiveNEQ

func LiveNEQ(v bool) predicate.Topic

LiveNEQ applies the NEQ predicate on the "live" field.

func LiveNotNil

func LiveNotNil() predicate.Topic

LiveNotNil applies the NotNil predicate on the "live" field.

func Name

func Name(v string) predicate.Topic

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

func NameContains

func NameContains(v string) predicate.Topic

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

func NameContainsFold

func NameContainsFold(v string) predicate.Topic

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

func NameEQ

func NameEQ(v string) predicate.Topic

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

func NameEqualFold

func NameEqualFold(v string) predicate.Topic

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

func NameGT

func NameGT(v string) predicate.Topic

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

func NameGTE

func NameGTE(v string) predicate.Topic

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Topic

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Topic

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Topic

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

func NameLTE

func NameLTE(v string) predicate.Topic

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

func NameNEQ

func NameNEQ(v string) predicate.Topic

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

func NameNotIn

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

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

Or groups predicates with the OR operator between them.

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 Topic queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the createdAt field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deletedAt field.

func ByID

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

ByID orders the results by the id field.

func ByLive

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

ByLive orders the results by the live field.

func ByMessages

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

ByMessages orders the results by messages terms.

func ByMessagesCount

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

ByMessagesCount orders the results by messages count.

func ByName

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

ByName orders the results by the name field.

func BySubscriptions

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

BySubscriptions orders the results by subscriptions terms.

func BySubscriptionsCount

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

BySubscriptionsCount orders the results by subscriptions count.

Jump to

Keyboard shortcuts

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