Init V4 community edition (#2265)
* Init V4 community edition * Init V4 community edition
This commit is contained in:
371
ent/file/file.go
Normal file
371
ent/file/file.go
Normal file
@@ -0,0 +1,371 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package file
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
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"
|
||||
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
|
||||
FieldDeletedAt = "deleted_at"
|
||||
// FieldType holds the string denoting the type field in the database.
|
||||
FieldType = "type"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "name"
|
||||
// FieldOwnerID holds the string denoting the owner_id field in the database.
|
||||
FieldOwnerID = "owner_id"
|
||||
// FieldSize holds the string denoting the size field in the database.
|
||||
FieldSize = "size"
|
||||
// FieldPrimaryEntity holds the string denoting the primary_entity field in the database.
|
||||
FieldPrimaryEntity = "primary_entity"
|
||||
// FieldFileChildren holds the string denoting the file_children field in the database.
|
||||
FieldFileChildren = "file_children"
|
||||
// FieldIsSymbolic holds the string denoting the is_symbolic field in the database.
|
||||
FieldIsSymbolic = "is_symbolic"
|
||||
// FieldProps holds the string denoting the props field in the database.
|
||||
FieldProps = "props"
|
||||
// FieldStoragePolicyFiles holds the string denoting the storage_policy_files field in the database.
|
||||
FieldStoragePolicyFiles = "storage_policy_files"
|
||||
// EdgeOwner holds the string denoting the owner edge name in mutations.
|
||||
EdgeOwner = "owner"
|
||||
// EdgeStoragePolicies holds the string denoting the storage_policies edge name in mutations.
|
||||
EdgeStoragePolicies = "storage_policies"
|
||||
// EdgeParent holds the string denoting the parent edge name in mutations.
|
||||
EdgeParent = "parent"
|
||||
// EdgeChildren holds the string denoting the children edge name in mutations.
|
||||
EdgeChildren = "children"
|
||||
// EdgeMetadata holds the string denoting the metadata edge name in mutations.
|
||||
EdgeMetadata = "metadata"
|
||||
// EdgeEntities holds the string denoting the entities edge name in mutations.
|
||||
EdgeEntities = "entities"
|
||||
// EdgeShares holds the string denoting the shares edge name in mutations.
|
||||
EdgeShares = "shares"
|
||||
// EdgeDirectLinks holds the string denoting the direct_links edge name in mutations.
|
||||
EdgeDirectLinks = "direct_links"
|
||||
// Table holds the table name of the file in the database.
|
||||
Table = "files"
|
||||
// OwnerTable is the table that holds the owner relation/edge.
|
||||
OwnerTable = "files"
|
||||
// OwnerInverseTable is the table name for the User entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "user" package.
|
||||
OwnerInverseTable = "users"
|
||||
// OwnerColumn is the table column denoting the owner relation/edge.
|
||||
OwnerColumn = "owner_id"
|
||||
// StoragePoliciesTable is the table that holds the storage_policies relation/edge.
|
||||
StoragePoliciesTable = "files"
|
||||
// StoragePoliciesInverseTable is the table name for the StoragePolicy entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "storagepolicy" package.
|
||||
StoragePoliciesInverseTable = "storage_policies"
|
||||
// StoragePoliciesColumn is the table column denoting the storage_policies relation/edge.
|
||||
StoragePoliciesColumn = "storage_policy_files"
|
||||
// ParentTable is the table that holds the parent relation/edge.
|
||||
ParentTable = "files"
|
||||
// ParentColumn is the table column denoting the parent relation/edge.
|
||||
ParentColumn = "file_children"
|
||||
// ChildrenTable is the table that holds the children relation/edge.
|
||||
ChildrenTable = "files"
|
||||
// ChildrenColumn is the table column denoting the children relation/edge.
|
||||
ChildrenColumn = "file_children"
|
||||
// MetadataTable is the table that holds the metadata relation/edge.
|
||||
MetadataTable = "metadata"
|
||||
// MetadataInverseTable is the table name for the Metadata entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "metadata" package.
|
||||
MetadataInverseTable = "metadata"
|
||||
// MetadataColumn is the table column denoting the metadata relation/edge.
|
||||
MetadataColumn = "file_id"
|
||||
// EntitiesTable is the table that holds the entities relation/edge. The primary key declared below.
|
||||
EntitiesTable = "file_entities"
|
||||
// EntitiesInverseTable is the table name for the Entity entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "entity" package.
|
||||
EntitiesInverseTable = "entities"
|
||||
// SharesTable is the table that holds the shares relation/edge.
|
||||
SharesTable = "shares"
|
||||
// SharesInverseTable is the table name for the Share entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "share" package.
|
||||
SharesInverseTable = "shares"
|
||||
// SharesColumn is the table column denoting the shares relation/edge.
|
||||
SharesColumn = "file_shares"
|
||||
// DirectLinksTable is the table that holds the direct_links relation/edge.
|
||||
DirectLinksTable = "direct_links"
|
||||
// DirectLinksInverseTable is the table name for the DirectLink entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "directlink" package.
|
||||
DirectLinksInverseTable = "direct_links"
|
||||
// DirectLinksColumn is the table column denoting the direct_links relation/edge.
|
||||
DirectLinksColumn = "file_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for file fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
FieldType,
|
||||
FieldName,
|
||||
FieldOwnerID,
|
||||
FieldSize,
|
||||
FieldPrimaryEntity,
|
||||
FieldFileChildren,
|
||||
FieldIsSymbolic,
|
||||
FieldProps,
|
||||
FieldStoragePolicyFiles,
|
||||
}
|
||||
|
||||
var (
|
||||
// EntitiesPrimaryKey and EntitiesColumn2 are the table columns denoting the
|
||||
// primary key for the entities relation (M2M).
|
||||
EntitiesPrimaryKey = []string{"file_id", "entity_id"}
|
||||
)
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 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 (
|
||||
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
|
||||
// DefaultSize holds the default value on creation for the "size" field.
|
||||
DefaultSize int64
|
||||
// DefaultIsSymbolic holds the default value on creation for the "is_symbolic" field.
|
||||
DefaultIsSymbolic bool
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the File queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeletedAt orders the results by the deleted_at field.
|
||||
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByType orders the results by the type field.
|
||||
func ByType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnerID orders the results by the owner_id field.
|
||||
func ByOwnerID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOwnerID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySize orders the results by the size field.
|
||||
func BySize(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSize, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPrimaryEntity orders the results by the primary_entity field.
|
||||
func ByPrimaryEntity(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPrimaryEntity, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFileChildren orders the results by the file_children field.
|
||||
func ByFileChildren(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFileChildren, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsSymbolic orders the results by the is_symbolic field.
|
||||
func ByIsSymbolic(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsSymbolic, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStoragePolicyFiles orders the results by the storage_policy_files field.
|
||||
func ByStoragePolicyFiles(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStoragePolicyFiles, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnerField orders the results by owner field.
|
||||
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newOwnerStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByStoragePoliciesField orders the results by storage_policies field.
|
||||
func ByStoragePoliciesField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newStoragePoliciesStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByParentField orders the results by parent field.
|
||||
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newParentStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByChildrenCount orders the results by children count.
|
||||
func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newChildrenStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByChildren orders the results by children terms.
|
||||
func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newChildrenStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByMetadataCount orders the results by metadata count.
|
||||
func ByMetadataCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newMetadataStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByMetadata orders the results by metadata terms.
|
||||
func ByMetadata(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMetadataStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByEntitiesCount orders the results by entities count.
|
||||
func ByEntitiesCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newEntitiesStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByEntities orders the results by entities terms.
|
||||
func ByEntities(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newEntitiesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// BySharesCount orders the results by shares count.
|
||||
func BySharesCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newSharesStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByShares orders the results by shares terms.
|
||||
func ByShares(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newSharesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByDirectLinksCount orders the results by direct_links count.
|
||||
func ByDirectLinksCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newDirectLinksStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByDirectLinks orders the results by direct_links terms.
|
||||
func ByDirectLinks(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newDirectLinksStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newOwnerStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(OwnerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn),
|
||||
)
|
||||
}
|
||||
func newStoragePoliciesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StoragePoliciesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StoragePoliciesTable, StoragePoliciesColumn),
|
||||
)
|
||||
}
|
||||
func newParentStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn),
|
||||
)
|
||||
}
|
||||
func newChildrenStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn),
|
||||
)
|
||||
}
|
||||
func newMetadataStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MetadataInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MetadataTable, MetadataColumn),
|
||||
)
|
||||
}
|
||||
func newEntitiesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(EntitiesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, false, EntitiesTable, EntitiesPrimaryKey...),
|
||||
)
|
||||
}
|
||||
func newSharesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(SharesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, SharesTable, SharesColumn),
|
||||
)
|
||||
}
|
||||
func newDirectLinksStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(DirectLinksInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, DirectLinksTable, DirectLinksColumn),
|
||||
)
|
||||
}
|
||||
735
ent/file/where.go
Normal file
735
ent/file/where.go
Normal file
@@ -0,0 +1,735 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package file
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/cloudreve/Cloudreve/v4/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
||||
func DeletedAt(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
|
||||
func Type(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
func Name(v string) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.
|
||||
func OwnerID(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldOwnerID, v))
|
||||
}
|
||||
|
||||
// Size applies equality check predicate on the "size" field. It's identical to SizeEQ.
|
||||
func Size(v int64) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// PrimaryEntity applies equality check predicate on the "primary_entity" field. It's identical to PrimaryEntityEQ.
|
||||
func PrimaryEntity(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldPrimaryEntity, v))
|
||||
}
|
||||
|
||||
// FileChildren applies equality check predicate on the "file_children" field. It's identical to FileChildrenEQ.
|
||||
func FileChildren(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldFileChildren, v))
|
||||
}
|
||||
|
||||
// IsSymbolic applies equality check predicate on the "is_symbolic" field. It's identical to IsSymbolicEQ.
|
||||
func IsSymbolic(v bool) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldIsSymbolic, v))
|
||||
}
|
||||
|
||||
// StoragePolicyFiles applies equality check predicate on the "storage_policy_files" field. It's identical to StoragePolicyFilesEQ.
|
||||
func StoragePolicyFiles(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldStoragePolicyFiles, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
||||
func DeletedAtEQ(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
||||
func DeletedAtNEQ(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
||||
func DeletedAtIn(vs ...time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
||||
func DeletedAtNotIn(vs ...time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
||||
func DeletedAtGT(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
||||
func DeletedAtGTE(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
||||
func DeletedAtLT(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
||||
func DeletedAtLTE(v time.Time) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
||||
func DeletedAtIsNil() predicate.File {
|
||||
return predicate.File(sql.FieldIsNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
||||
func DeletedAtNotNil() predicate.File {
|
||||
return predicate.File(sql.FieldNotNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// TypeEQ applies the EQ predicate on the "type" field.
|
||||
func TypeEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeNEQ applies the NEQ predicate on the "type" field.
|
||||
func TypeNEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeIn applies the In predicate on the "type" field.
|
||||
func TypeIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldType, vs...))
|
||||
}
|
||||
|
||||
// TypeNotIn applies the NotIn predicate on the "type" field.
|
||||
func TypeNotIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldType, vs...))
|
||||
}
|
||||
|
||||
// TypeGT applies the GT predicate on the "type" field.
|
||||
func TypeGT(v int) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeGTE applies the GTE predicate on the "type" field.
|
||||
func TypeGTE(v int) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeLT applies the LT predicate on the "type" field.
|
||||
func TypeLT(v int) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeLTE applies the LTE predicate on the "type" field.
|
||||
func TypeLTE(v int) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldType, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameNEQ applies the NEQ predicate on the "name" field.
|
||||
func NameNEQ(v string) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameGT applies the GT predicate on the "name" field.
|
||||
func NameGT(v string) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameGTE applies the GTE predicate on the "name" field.
|
||||
func NameGTE(v string) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLT applies the LT predicate on the "name" field.
|
||||
func NameLT(v string) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLTE applies the LTE predicate on the "name" field.
|
||||
func NameLTE(v string) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContains applies the Contains predicate on the "name" field.
|
||||
func NameContains(v string) predicate.File {
|
||||
return predicate.File(sql.FieldContains(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
||||
func NameHasPrefix(v string) predicate.File {
|
||||
return predicate.File(sql.FieldHasPrefix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
||||
func NameHasSuffix(v string) predicate.File {
|
||||
return predicate.File(sql.FieldHasSuffix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
||||
func NameEqualFold(v string) predicate.File {
|
||||
return predicate.File(sql.FieldEqualFold(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
||||
func NameContainsFold(v string) predicate.File {
|
||||
return predicate.File(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// OwnerIDEQ applies the EQ predicate on the "owner_id" field.
|
||||
func OwnerIDEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldOwnerID, v))
|
||||
}
|
||||
|
||||
// OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.
|
||||
func OwnerIDNEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldOwnerID, v))
|
||||
}
|
||||
|
||||
// OwnerIDIn applies the In predicate on the "owner_id" field.
|
||||
func OwnerIDIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldOwnerID, vs...))
|
||||
}
|
||||
|
||||
// OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.
|
||||
func OwnerIDNotIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldOwnerID, vs...))
|
||||
}
|
||||
|
||||
// SizeEQ applies the EQ predicate on the "size" field.
|
||||
func SizeEQ(v int64) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeNEQ applies the NEQ predicate on the "size" field.
|
||||
func SizeNEQ(v int64) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeIn applies the In predicate on the "size" field.
|
||||
func SizeIn(vs ...int64) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldSize, vs...))
|
||||
}
|
||||
|
||||
// SizeNotIn applies the NotIn predicate on the "size" field.
|
||||
func SizeNotIn(vs ...int64) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldSize, vs...))
|
||||
}
|
||||
|
||||
// SizeGT applies the GT predicate on the "size" field.
|
||||
func SizeGT(v int64) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeGTE applies the GTE predicate on the "size" field.
|
||||
func SizeGTE(v int64) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeLT applies the LT predicate on the "size" field.
|
||||
func SizeLT(v int64) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeLTE applies the LTE predicate on the "size" field.
|
||||
func SizeLTE(v int64) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldSize, v))
|
||||
}
|
||||
|
||||
// PrimaryEntityEQ applies the EQ predicate on the "primary_entity" field.
|
||||
func PrimaryEntityEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldPrimaryEntity, v))
|
||||
}
|
||||
|
||||
// PrimaryEntityNEQ applies the NEQ predicate on the "primary_entity" field.
|
||||
func PrimaryEntityNEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldPrimaryEntity, v))
|
||||
}
|
||||
|
||||
// PrimaryEntityIn applies the In predicate on the "primary_entity" field.
|
||||
func PrimaryEntityIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldPrimaryEntity, vs...))
|
||||
}
|
||||
|
||||
// PrimaryEntityNotIn applies the NotIn predicate on the "primary_entity" field.
|
||||
func PrimaryEntityNotIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldPrimaryEntity, vs...))
|
||||
}
|
||||
|
||||
// PrimaryEntityGT applies the GT predicate on the "primary_entity" field.
|
||||
func PrimaryEntityGT(v int) predicate.File {
|
||||
return predicate.File(sql.FieldGT(FieldPrimaryEntity, v))
|
||||
}
|
||||
|
||||
// PrimaryEntityGTE applies the GTE predicate on the "primary_entity" field.
|
||||
func PrimaryEntityGTE(v int) predicate.File {
|
||||
return predicate.File(sql.FieldGTE(FieldPrimaryEntity, v))
|
||||
}
|
||||
|
||||
// PrimaryEntityLT applies the LT predicate on the "primary_entity" field.
|
||||
func PrimaryEntityLT(v int) predicate.File {
|
||||
return predicate.File(sql.FieldLT(FieldPrimaryEntity, v))
|
||||
}
|
||||
|
||||
// PrimaryEntityLTE applies the LTE predicate on the "primary_entity" field.
|
||||
func PrimaryEntityLTE(v int) predicate.File {
|
||||
return predicate.File(sql.FieldLTE(FieldPrimaryEntity, v))
|
||||
}
|
||||
|
||||
// PrimaryEntityIsNil applies the IsNil predicate on the "primary_entity" field.
|
||||
func PrimaryEntityIsNil() predicate.File {
|
||||
return predicate.File(sql.FieldIsNull(FieldPrimaryEntity))
|
||||
}
|
||||
|
||||
// PrimaryEntityNotNil applies the NotNil predicate on the "primary_entity" field.
|
||||
func PrimaryEntityNotNil() predicate.File {
|
||||
return predicate.File(sql.FieldNotNull(FieldPrimaryEntity))
|
||||
}
|
||||
|
||||
// FileChildrenEQ applies the EQ predicate on the "file_children" field.
|
||||
func FileChildrenEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldFileChildren, v))
|
||||
}
|
||||
|
||||
// FileChildrenNEQ applies the NEQ predicate on the "file_children" field.
|
||||
func FileChildrenNEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldFileChildren, v))
|
||||
}
|
||||
|
||||
// FileChildrenIn applies the In predicate on the "file_children" field.
|
||||
func FileChildrenIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldFileChildren, vs...))
|
||||
}
|
||||
|
||||
// FileChildrenNotIn applies the NotIn predicate on the "file_children" field.
|
||||
func FileChildrenNotIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldFileChildren, vs...))
|
||||
}
|
||||
|
||||
// FileChildrenIsNil applies the IsNil predicate on the "file_children" field.
|
||||
func FileChildrenIsNil() predicate.File {
|
||||
return predicate.File(sql.FieldIsNull(FieldFileChildren))
|
||||
}
|
||||
|
||||
// FileChildrenNotNil applies the NotNil predicate on the "file_children" field.
|
||||
func FileChildrenNotNil() predicate.File {
|
||||
return predicate.File(sql.FieldNotNull(FieldFileChildren))
|
||||
}
|
||||
|
||||
// IsSymbolicEQ applies the EQ predicate on the "is_symbolic" field.
|
||||
func IsSymbolicEQ(v bool) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldIsSymbolic, v))
|
||||
}
|
||||
|
||||
// IsSymbolicNEQ applies the NEQ predicate on the "is_symbolic" field.
|
||||
func IsSymbolicNEQ(v bool) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldIsSymbolic, v))
|
||||
}
|
||||
|
||||
// PropsIsNil applies the IsNil predicate on the "props" field.
|
||||
func PropsIsNil() predicate.File {
|
||||
return predicate.File(sql.FieldIsNull(FieldProps))
|
||||
}
|
||||
|
||||
// PropsNotNil applies the NotNil predicate on the "props" field.
|
||||
func PropsNotNil() predicate.File {
|
||||
return predicate.File(sql.FieldNotNull(FieldProps))
|
||||
}
|
||||
|
||||
// StoragePolicyFilesEQ applies the EQ predicate on the "storage_policy_files" field.
|
||||
func StoragePolicyFilesEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldEQ(FieldStoragePolicyFiles, v))
|
||||
}
|
||||
|
||||
// StoragePolicyFilesNEQ applies the NEQ predicate on the "storage_policy_files" field.
|
||||
func StoragePolicyFilesNEQ(v int) predicate.File {
|
||||
return predicate.File(sql.FieldNEQ(FieldStoragePolicyFiles, v))
|
||||
}
|
||||
|
||||
// StoragePolicyFilesIn applies the In predicate on the "storage_policy_files" field.
|
||||
func StoragePolicyFilesIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldIn(FieldStoragePolicyFiles, vs...))
|
||||
}
|
||||
|
||||
// StoragePolicyFilesNotIn applies the NotIn predicate on the "storage_policy_files" field.
|
||||
func StoragePolicyFilesNotIn(vs ...int) predicate.File {
|
||||
return predicate.File(sql.FieldNotIn(FieldStoragePolicyFiles, vs...))
|
||||
}
|
||||
|
||||
// StoragePolicyFilesIsNil applies the IsNil predicate on the "storage_policy_files" field.
|
||||
func StoragePolicyFilesIsNil() predicate.File {
|
||||
return predicate.File(sql.FieldIsNull(FieldStoragePolicyFiles))
|
||||
}
|
||||
|
||||
// StoragePolicyFilesNotNil applies the NotNil predicate on the "storage_policy_files" field.
|
||||
func StoragePolicyFilesNotNil() predicate.File {
|
||||
return predicate.File(sql.FieldNotNull(FieldStoragePolicyFiles))
|
||||
}
|
||||
|
||||
// HasOwner applies the HasEdge predicate on the "owner" edge.
|
||||
func HasOwner() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
|
||||
func HasOwnerWith(preds ...predicate.User) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newOwnerStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasStoragePolicies applies the HasEdge predicate on the "storage_policies" edge.
|
||||
func HasStoragePolicies() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StoragePoliciesTable, StoragePoliciesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasStoragePoliciesWith applies the HasEdge predicate on the "storage_policies" edge with a given conditions (other predicates).
|
||||
func HasStoragePoliciesWith(preds ...predicate.StoragePolicy) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newStoragePoliciesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasParent applies the HasEdge predicate on the "parent" edge.
|
||||
func HasParent() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
|
||||
func HasParentWith(preds ...predicate.File) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newParentStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasChildren applies the HasEdge predicate on the "children" edge.
|
||||
func HasChildren() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
|
||||
func HasChildrenWith(preds ...predicate.File) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newChildrenStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasMetadata applies the HasEdge predicate on the "metadata" edge.
|
||||
func HasMetadata() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MetadataTable, MetadataColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasMetadataWith applies the HasEdge predicate on the "metadata" edge with a given conditions (other predicates).
|
||||
func HasMetadataWith(preds ...predicate.Metadata) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newMetadataStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasEntities applies the HasEdge predicate on the "entities" edge.
|
||||
func HasEntities() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, false, EntitiesTable, EntitiesPrimaryKey...),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasEntitiesWith applies the HasEdge predicate on the "entities" edge with a given conditions (other predicates).
|
||||
func HasEntitiesWith(preds ...predicate.Entity) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newEntitiesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasShares applies the HasEdge predicate on the "shares" edge.
|
||||
func HasShares() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, SharesTable, SharesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasSharesWith applies the HasEdge predicate on the "shares" edge with a given conditions (other predicates).
|
||||
func HasSharesWith(preds ...predicate.Share) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newSharesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasDirectLinks applies the HasEdge predicate on the "direct_links" edge.
|
||||
func HasDirectLinks() predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, DirectLinksTable, DirectLinksColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasDirectLinksWith applies the HasEdge predicate on the "direct_links" edge with a given conditions (other predicates).
|
||||
func HasDirectLinksWith(preds ...predicate.DirectLink) predicate.File {
|
||||
return predicate.File(func(s *sql.Selector) {
|
||||
step := newDirectLinksStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.File) predicate.File {
|
||||
return predicate.File(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.File) predicate.File {
|
||||
return predicate.File(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.File) predicate.File {
|
||||
return predicate.File(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user