file

package
v0.0.0-...-6a61234 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the file type in the database.
	Label = "file"
	// 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"
	// FieldResourceType holds the string denoting the resource_type field in the database.
	FieldResourceType = "resource_type"
	// EdgeUsers holds the string denoting the users edge name in mutations.
	EdgeUsers = "users"
	// EdgePosts holds the string denoting the posts edge name in mutations.
	EdgePosts = "posts"
	// EdgeChats holds the string denoting the chats edge name in mutations.
	EdgeChats = "chats"
	// EdgeMessages holds the string denoting the messages edge name in mutations.
	EdgeMessages = "messages"
	// Table holds the table name of the file in the database.
	Table = "files"
	// UsersTable is the table that holds the users relation/edge.
	UsersTable = "users"
	// UsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UsersInverseTable = "users"
	// UsersColumn is the table column denoting the users relation/edge.
	UsersColumn = "avatar_id"
	// PostsTable is the table that holds the posts relation/edge.
	PostsTable = "posts"
	// PostsInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	PostsInverseTable = "posts"
	// PostsColumn is the table column denoting the posts relation/edge.
	PostsColumn = "image_id"
	// ChatsTable is the table that holds the chats relation/edge.
	ChatsTable = "chats"
	// ChatsInverseTable is the table name for the Chat entity.
	// It exists in this package in order to avoid circular dependency with the "chat" package.
	ChatsInverseTable = "chats"
	// ChatsColumn is the table column denoting the chats relation/edge.
	ChatsColumn = "image_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 = "file_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
	// ResourceTypeValidator is a validator for the "resource_type" field. It is called by the builders before save.
	ResourceTypeValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for file fields.

Functions

func And

func And(predicates ...predicate.File) predicate.File

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.File

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.File

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.File

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.File

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.File

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.File

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.File

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

func CreatedAtNotIn

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

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

func HasChats

func HasChats() predicate.File

HasChats applies the HasEdge predicate on the "chats" edge.

func HasChatsWith

func HasChatsWith(preds ...predicate.Chat) predicate.File

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

func HasMessages

func HasMessages() predicate.File

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

func HasMessagesWith

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

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

func HasPosts

func HasPosts() predicate.File

HasPosts applies the HasEdge predicate on the "posts" edge.

func HasPostsWith

func HasPostsWith(preds ...predicate.Post) predicate.File

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

func HasUsers

func HasUsers() predicate.File

HasUsers applies the HasEdge predicate on the "users" edge.

func HasUsersWith

func HasUsersWith(preds ...predicate.User) predicate.File

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

func ID

func ID(id uuid.UUID) predicate.File

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.File

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.File

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.File

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.File

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.File

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.File

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func ResourceType

func ResourceType(v string) predicate.File

ResourceType applies equality check predicate on the "resource_type" field. It's identical to ResourceTypeEQ.

func ResourceTypeContains

func ResourceTypeContains(v string) predicate.File

ResourceTypeContains applies the Contains predicate on the "resource_type" field.

func ResourceTypeContainsFold

func ResourceTypeContainsFold(v string) predicate.File

ResourceTypeContainsFold applies the ContainsFold predicate on the "resource_type" field.

func ResourceTypeEQ

func ResourceTypeEQ(v string) predicate.File

ResourceTypeEQ applies the EQ predicate on the "resource_type" field.

func ResourceTypeEqualFold

func ResourceTypeEqualFold(v string) predicate.File

ResourceTypeEqualFold applies the EqualFold predicate on the "resource_type" field.

func ResourceTypeGT

func ResourceTypeGT(v string) predicate.File

ResourceTypeGT applies the GT predicate on the "resource_type" field.

func ResourceTypeGTE

func ResourceTypeGTE(v string) predicate.File

ResourceTypeGTE applies the GTE predicate on the "resource_type" field.

func ResourceTypeHasPrefix

func ResourceTypeHasPrefix(v string) predicate.File

ResourceTypeHasPrefix applies the HasPrefix predicate on the "resource_type" field.

func ResourceTypeHasSuffix

func ResourceTypeHasSuffix(v string) predicate.File

ResourceTypeHasSuffix applies the HasSuffix predicate on the "resource_type" field.

func ResourceTypeIn

func ResourceTypeIn(vs ...string) predicate.File

ResourceTypeIn applies the In predicate on the "resource_type" field.

func ResourceTypeLT

func ResourceTypeLT(v string) predicate.File

ResourceTypeLT applies the LT predicate on the "resource_type" field.

func ResourceTypeLTE

func ResourceTypeLTE(v string) predicate.File

ResourceTypeLTE applies the LTE predicate on the "resource_type" field.

func ResourceTypeNEQ

func ResourceTypeNEQ(v string) predicate.File

ResourceTypeNEQ applies the NEQ predicate on the "resource_type" field.

func ResourceTypeNotIn

func ResourceTypeNotIn(vs ...string) predicate.File

ResourceTypeNotIn applies the NotIn predicate on the "resource_type" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.File

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.File

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.File

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.File

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.File

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.File

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.File

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

func UpdatedAtNotIn

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

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

func ByChats

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

ByChats orders the results by chats terms.

func ByChatsCount

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

ByChatsCount orders the results by chats count.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id 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 ByPosts

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

ByPosts orders the results by posts terms.

func ByPostsCount

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

ByPostsCount orders the results by posts count.

func ByResourceType

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

ByResourceType orders the results by the resource_type field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUsers

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

ByUsers orders the results by users terms.

func ByUsersCount

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

ByUsersCount orders the results by users count.

Jump to

Keyboard shortcuts

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