Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.File) predicate.File
- func CreatedAt(v time.Time) predicate.File
- func CreatedAtEQ(v time.Time) predicate.File
- func CreatedAtGT(v time.Time) predicate.File
- func CreatedAtGTE(v time.Time) predicate.File
- func CreatedAtIn(vs ...time.Time) predicate.File
- func CreatedAtLT(v time.Time) predicate.File
- func CreatedAtLTE(v time.Time) predicate.File
- func CreatedAtNEQ(v time.Time) predicate.File
- func CreatedAtNotIn(vs ...time.Time) predicate.File
- func HasChats() predicate.File
- func HasChatsWith(preds ...predicate.Chat) predicate.File
- func HasMessages() predicate.File
- func HasMessagesWith(preds ...predicate.Message) predicate.File
- func HasPosts() predicate.File
- func HasPostsWith(preds ...predicate.Post) predicate.File
- func HasUsers() predicate.File
- func HasUsersWith(preds ...predicate.User) predicate.File
- func ID(id uuid.UUID) predicate.File
- func IDEQ(id uuid.UUID) predicate.File
- func IDGT(id uuid.UUID) predicate.File
- func IDGTE(id uuid.UUID) predicate.File
- func IDIn(ids ...uuid.UUID) predicate.File
- func IDLT(id uuid.UUID) predicate.File
- func IDLTE(id uuid.UUID) predicate.File
- func IDNEQ(id uuid.UUID) predicate.File
- func IDNotIn(ids ...uuid.UUID) predicate.File
- func Not(p predicate.File) predicate.File
- func Or(predicates ...predicate.File) predicate.File
- func ResourceType(v string) predicate.File
- func ResourceTypeContains(v string) predicate.File
- func ResourceTypeContainsFold(v string) predicate.File
- func ResourceTypeEQ(v string) predicate.File
- func ResourceTypeEqualFold(v string) predicate.File
- func ResourceTypeGT(v string) predicate.File
- func ResourceTypeGTE(v string) predicate.File
- func ResourceTypeHasPrefix(v string) predicate.File
- func ResourceTypeHasSuffix(v string) predicate.File
- func ResourceTypeIn(vs ...string) predicate.File
- func ResourceTypeLT(v string) predicate.File
- func ResourceTypeLTE(v string) predicate.File
- func ResourceTypeNEQ(v string) predicate.File
- func ResourceTypeNotIn(vs ...string) predicate.File
- func UpdatedAt(v time.Time) predicate.File
- func UpdatedAtEQ(v time.Time) predicate.File
- func UpdatedAtGT(v time.Time) predicate.File
- func UpdatedAtGTE(v time.Time) predicate.File
- func UpdatedAtIn(vs ...time.Time) predicate.File
- func UpdatedAtLT(v time.Time) predicate.File
- func UpdatedAtLTE(v time.Time) predicate.File
- func UpdatedAtNEQ(v time.Time) predicate.File
- func UpdatedAtNotIn(vs ...time.Time) predicate.File
- func ValidColumn(column string) bool
- type OrderOption
- func ByChats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChatsCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByMessagesCount(opts ...sql.OrderTermOption) OrderOption
- func ByPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPostsCount(opts ...sql.OrderTermOption) OrderOption
- func ByResourceType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldResourceType, }
Columns holds all SQL columns for file fields.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasChatsWith ¶
HasChatsWith applies the HasEdge predicate on the "chats" edge with a given conditions (other predicates).
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 HasPostsWith ¶
HasPostsWith applies the HasEdge predicate on the "posts" edge with a given conditions (other predicates).
func HasUsersWith ¶
HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func ResourceType ¶
ResourceType applies equality check predicate on the "resource_type" field. It's identical to ResourceTypeEQ.
func ResourceTypeContains ¶
ResourceTypeContains applies the Contains predicate on the "resource_type" field.
func ResourceTypeContainsFold ¶
ResourceTypeContainsFold applies the ContainsFold predicate on the "resource_type" field.
func ResourceTypeEQ ¶
ResourceTypeEQ applies the EQ predicate on the "resource_type" field.
func ResourceTypeEqualFold ¶
ResourceTypeEqualFold applies the EqualFold predicate on the "resource_type" field.
func ResourceTypeGT ¶
ResourceTypeGT applies the GT predicate on the "resource_type" field.
func ResourceTypeGTE ¶
ResourceTypeGTE applies the GTE predicate on the "resource_type" field.
func ResourceTypeHasPrefix ¶
ResourceTypeHasPrefix applies the HasPrefix predicate on the "resource_type" field.
func ResourceTypeHasSuffix ¶
ResourceTypeHasSuffix applies the HasSuffix predicate on the "resource_type" field.
func ResourceTypeIn ¶
ResourceTypeIn applies the In predicate on the "resource_type" field.
func ResourceTypeLT ¶
ResourceTypeLT applies the LT predicate on the "resource_type" field.
func ResourceTypeLTE ¶
ResourceTypeLTE applies the LTE predicate on the "resource_type" field.
func ResourceTypeNEQ ¶
ResourceTypeNEQ applies the NEQ predicate on the "resource_type" field.
func ResourceTypeNotIn ¶
ResourceTypeNotIn applies the NotIn predicate on the "resource_type" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 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.