Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Topic) predicate.Topic
- func CreatedAt(v time.Time) predicate.Topic
- func CreatedAtEQ(v time.Time) predicate.Topic
- func CreatedAtGT(v time.Time) predicate.Topic
- func CreatedAtGTE(v time.Time) predicate.Topic
- func CreatedAtIn(vs ...time.Time) predicate.Topic
- func CreatedAtLT(v time.Time) predicate.Topic
- func CreatedAtLTE(v time.Time) predicate.Topic
- func CreatedAtNEQ(v time.Time) predicate.Topic
- func CreatedAtNotIn(vs ...time.Time) predicate.Topic
- func DeletedAt(v time.Time) predicate.Topic
- func DeletedAtEQ(v time.Time) predicate.Topic
- func DeletedAtGT(v time.Time) predicate.Topic
- func DeletedAtGTE(v time.Time) predicate.Topic
- func DeletedAtIn(vs ...time.Time) predicate.Topic
- func DeletedAtIsNil() predicate.Topic
- func DeletedAtLT(v time.Time) predicate.Topic
- func DeletedAtLTE(v time.Time) predicate.Topic
- func DeletedAtNEQ(v time.Time) predicate.Topic
- func DeletedAtNotIn(vs ...time.Time) predicate.Topic
- func DeletedAtNotNil() predicate.Topic
- func HasMessages() predicate.Topic
- func HasMessagesWith(preds ...predicate.Message) predicate.Topic
- func HasSubscriptions() predicate.Topic
- func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.Topic
- func ID(id uuid.UUID) predicate.Topic
- func IDEQ(id uuid.UUID) predicate.Topic
- func IDGT(id uuid.UUID) predicate.Topic
- func IDGTE(id uuid.UUID) predicate.Topic
- func IDIn(ids ...uuid.UUID) predicate.Topic
- func IDLT(id uuid.UUID) predicate.Topic
- func IDLTE(id uuid.UUID) predicate.Topic
- func IDNEQ(id uuid.UUID) predicate.Topic
- func IDNotIn(ids ...uuid.UUID) predicate.Topic
- func LabelsIsNil() predicate.Topic
- func LabelsNotNil() predicate.Topic
- func Live(v bool) predicate.Topic
- func LiveEQ(v bool) predicate.Topic
- func LiveIsNil() predicate.Topic
- func LiveNEQ(v bool) predicate.Topic
- func LiveNotNil() predicate.Topic
- func Name(v string) predicate.Topic
- func NameContains(v string) predicate.Topic
- func NameContainsFold(v string) predicate.Topic
- func NameEQ(v string) predicate.Topic
- func NameEqualFold(v string) predicate.Topic
- func NameGT(v string) predicate.Topic
- func NameGTE(v string) predicate.Topic
- func NameHasPrefix(v string) predicate.Topic
- func NameHasSuffix(v string) predicate.Topic
- func NameIn(vs ...string) predicate.Topic
- func NameLT(v string) predicate.Topic
- func NameLTE(v string) predicate.Topic
- func NameNEQ(v string) predicate.Topic
- func NameNotIn(vs ...string) predicate.Topic
- func Not(p predicate.Topic) predicate.Topic
- func Or(predicates ...predicate.Topic) predicate.Topic
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByLive(opts ...sql.OrderTermOption) OrderOption
- func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByMessagesCount(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func BySubscriptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubscriptionsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"
var Columns = []string{ FieldID, FieldName, FieldCreatedAt, FieldLive, FieldDeletedAt, FieldLabels, }
Columns holds all SQL columns for topic fields.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "createdAt" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "createdAt" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "createdAt" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "createdAt" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "createdAt" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "createdAt" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deletedAt" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deletedAt" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deletedAt" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deletedAt" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deletedAt" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deletedAt" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deletedAt" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deletedAt" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deletedAt" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deletedAt" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deletedAt" field.
func HasMessages ¶
HasMessages applies the HasEdge predicate on the "messages" edge.
func HasMessagesWith ¶
HasMessagesWith applies the HasEdge predicate on the "messages" edge with a given conditions (other predicates).
func HasSubscriptions ¶
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 LabelsIsNil ¶
LabelsIsNil applies the IsNil predicate on the "labels" field.
func LabelsNotNil ¶
LabelsNotNil applies the NotNil predicate on the "labels" field.
func LiveNotNil ¶
LiveNotNil applies the NotNil predicate on the "live" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.