Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Metadata) predicate.Metadata
- func CreatedAt(v time.Time) predicate.Metadata
- func CreatedAtEQ(v time.Time) predicate.Metadata
- func CreatedAtGT(v time.Time) predicate.Metadata
- func CreatedAtGTE(v time.Time) predicate.Metadata
- func CreatedAtIn(vs ...time.Time) predicate.Metadata
- func CreatedAtLT(v time.Time) predicate.Metadata
- func CreatedAtLTE(v time.Time) predicate.Metadata
- func CreatedAtNEQ(v time.Time) predicate.Metadata
- func CreatedAtNotIn(vs ...time.Time) predicate.Metadata
- func DeletedAt(v time.Time) predicate.Metadata
- func DeletedAtEQ(v time.Time) predicate.Metadata
- func DeletedAtGT(v time.Time) predicate.Metadata
- func DeletedAtGTE(v time.Time) predicate.Metadata
- func DeletedAtIn(vs ...time.Time) predicate.Metadata
- func DeletedAtIsNil() predicate.Metadata
- func DeletedAtLT(v time.Time) predicate.Metadata
- func DeletedAtLTE(v time.Time) predicate.Metadata
- func DeletedAtNEQ(v time.Time) predicate.Metadata
- func DeletedAtNotIn(vs ...time.Time) predicate.Metadata
- func DeletedAtNotNil() predicate.Metadata
- func FileID(v int) predicate.Metadata
- func FileIDEQ(v int) predicate.Metadata
- func FileIDIn(vs ...int) predicate.Metadata
- func FileIDNEQ(v int) predicate.Metadata
- func FileIDNotIn(vs ...int) predicate.Metadata
- func HasFile() predicate.Metadata
- func HasFileWith(preds ...predicate.File) predicate.Metadata
- func ID(id int) predicate.Metadata
- func IDEQ(id int) predicate.Metadata
- func IDGT(id int) predicate.Metadata
- func IDGTE(id int) predicate.Metadata
- func IDIn(ids ...int) predicate.Metadata
- func IDLT(id int) predicate.Metadata
- func IDLTE(id int) predicate.Metadata
- func IDNEQ(id int) predicate.Metadata
- func IDNotIn(ids ...int) predicate.Metadata
- func IsPublic(v bool) predicate.Metadata
- func IsPublicEQ(v bool) predicate.Metadata
- func IsPublicNEQ(v bool) predicate.Metadata
- func Name(v string) predicate.Metadata
- func NameContains(v string) predicate.Metadata
- func NameContainsFold(v string) predicate.Metadata
- func NameEQ(v string) predicate.Metadata
- func NameEqualFold(v string) predicate.Metadata
- func NameGT(v string) predicate.Metadata
- func NameGTE(v string) predicate.Metadata
- func NameHasPrefix(v string) predicate.Metadata
- func NameHasSuffix(v string) predicate.Metadata
- func NameIn(vs ...string) predicate.Metadata
- func NameLT(v string) predicate.Metadata
- func NameLTE(v string) predicate.Metadata
- func NameNEQ(v string) predicate.Metadata
- func NameNotIn(vs ...string) predicate.Metadata
- func Not(p predicate.Metadata) predicate.Metadata
- func Or(predicates ...predicate.Metadata) predicate.Metadata
- func UpdatedAt(v time.Time) predicate.Metadata
- func UpdatedAtEQ(v time.Time) predicate.Metadata
- func UpdatedAtGT(v time.Time) predicate.Metadata
- func UpdatedAtGTE(v time.Time) predicate.Metadata
- func UpdatedAtIn(vs ...time.Time) predicate.Metadata
- func UpdatedAtLT(v time.Time) predicate.Metadata
- func UpdatedAtLTE(v time.Time) predicate.Metadata
- func UpdatedAtNEQ(v time.Time) predicate.Metadata
- func UpdatedAtNotIn(vs ...time.Time) predicate.Metadata
- func ValidColumn(column string) bool
- func Value(v string) predicate.Metadata
- func ValueContains(v string) predicate.Metadata
- func ValueContainsFold(v string) predicate.Metadata
- func ValueEQ(v string) predicate.Metadata
- func ValueEqualFold(v string) predicate.Metadata
- func ValueGT(v string) predicate.Metadata
- func ValueGTE(v string) predicate.Metadata
- func ValueHasPrefix(v string) predicate.Metadata
- func ValueHasSuffix(v string) predicate.Metadata
- func ValueIn(vs ...string) predicate.Metadata
- func ValueLT(v string) predicate.Metadata
- func ValueLTE(v string) predicate.Metadata
- func ValueNEQ(v string) predicate.Metadata
- func ValueNotIn(vs ...string) predicate.Metadata
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByFileID(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsPublic(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByValue(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the metadata type in the database. Label = "metadata" // 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" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // FieldFileID holds the string denoting the file_id field in the database. FieldFileID = "file_id" // FieldIsPublic holds the string denoting the is_public field in the database. FieldIsPublic = "is_public" // EdgeFile holds the string denoting the file edge name in mutations. EdgeFile = "file" // Table holds the table name of the metadata in the database. Table = "metadata" // FileTable is the table that holds the file relation/edge. FileTable = "metadata" // FileInverseTable is the table name for the File entity. // It exists in this package in order to avoid circular dependency with the "file" package. FileInverseTable = "files" // FileColumn is the table column denoting the file relation/edge. FileColumn = "file_id" )
Variables ¶
var ( Hooks [1]ent.Hook Interceptors [1]ent.Interceptor // 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 // DefaultIsPublic holds the default value on creation for the "is_public" field. DefaultIsPublic bool )
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 _ "github.com/cloudreve/Cloudreve/v4/ent/runtime"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldName, FieldValue, FieldFileID, FieldIsPublic, }
Columns holds all SQL columns for metadata 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 DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func FileID ¶
FileID applies equality check predicate on the "file_id" field. It's identical to FileIDEQ.
func FileIDNotIn ¶
FileIDNotIn applies the NotIn predicate on the "file_id" field.
func HasFileWith ¶
HasFileWith applies the HasEdge predicate on the "file" edge with a given conditions (other predicates).
func IsPublic ¶
IsPublic applies equality check predicate on the "is_public" field. It's identical to IsPublicEQ.
func IsPublicEQ ¶
IsPublicEQ applies the EQ predicate on the "is_public" field.
func IsPublicNEQ ¶
IsPublicNEQ applies the NEQ predicate on the "is_public" 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 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).
func Value ¶
Value applies equality check predicate on the "value" field. It's identical to ValueEQ.
func ValueContains ¶
ValueContains applies the Contains predicate on the "value" field.
func ValueContainsFold ¶
ValueContainsFold applies the ContainsFold predicate on the "value" field.
func ValueEqualFold ¶
ValueEqualFold applies the EqualFold predicate on the "value" field.
func ValueHasPrefix ¶
ValueHasPrefix applies the HasPrefix predicate on the "value" field.
func ValueHasSuffix ¶
ValueHasSuffix applies the HasSuffix predicate on the "value" field.
func ValueNotIn ¶
ValueNotIn applies the NotIn predicate on the "value" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Metadata 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 ByFileField ¶
func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption
ByFileField orders the results by file field.
func ByFileID ¶
func ByFileID(opts ...sql.OrderTermOption) OrderOption
ByFileID orders the results by the file_id field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIsPublic ¶
func ByIsPublic(opts ...sql.OrderTermOption) OrderOption
ByIsPublic orders the results by the is_public field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByValue ¶
func ByValue(opts ...sql.OrderTermOption) OrderOption
ByValue orders the results by the value field.